Class: Redis::Model::FieldProxy
- Inherits:
-
Object
- Object
- Redis::Model::FieldProxy
- Defined in:
- lib/redis/model.rb
Overview
:nodoc
Instance Method Summary collapse
-
#initialize(redis, name, marshal) ⇒ FieldProxy
constructor
A new instance of FieldProxy.
- #method_missing(method, *argv) ⇒ Object
Constructor Details
#initialize(redis, name, marshal) ⇒ FieldProxy
Returns a new instance of FieldProxy.
232 233 234 235 236 |
# File 'lib/redis/model.rb', line 232 def initialize(redis, name, marshal) @redis = redis @name = name @marshal = marshal end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *argv) ⇒ Object
238 239 240 241 242 |
# File 'lib/redis/model.rb', line 238 def method_missing(method, *argv) translated_method = translate_method_name(method) raise NoMethodError.new("Method '#{method}' is not defined") unless translated_method @redis.send translated_method, @name, *argv end |