Browse files

Make the accessor of value return the result of calling #value on the…

… underlying Redis::Value instance
  • Loading branch information...
1 parent 09f313b commit cb217eb943dd522d746cd8a8822b04b955006779 @obie committed Apr 19, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/redis/objects/values.rb
View
2 lib/redis/objects/values.rb
@@ -20,6 +20,7 @@ def value(name, options={})
instance_eval <<-EndMethods
def #{name}
@#{name} ||= Redis::Value.new(redis_field_key(:#{name}), #{klass_name}.redis, #{klass_name}.redis_objects[:#{name}])
+ @#{name}.value
end
def #{name}=(value)
#{name}.value = value
@@ -37,6 +38,7 @@ def #{name}=(value)
class_eval <<-EndMethods
def #{name}
@#{name} ||= Redis::Value.new(redis_field_key(:#{name}), #{klass_name}.redis, #{klass_name}.redis_objects[:#{name}])
+ @#{name}.value
end
def #{name}=(value)
#{name}.value = value

0 comments on commit cb217eb

Please sign in to comment.