Class: KawaiiAssociation::Evaluator
- Inherits:
- BasicObject
- Defined in:
- lib/kawaii_association.rb
Instance Method Summary collapse
-
#initialize(model, type) ⇒ Evaluator
constructor
A new instance of Evaluator.
- #method_missing(name, *scope, **opts, &extension) ⇒ Object
Constructor Details
#initialize(model, type) ⇒ Evaluator
Returns a new instance of Evaluator.
19 20 21 |
# File 'lib/kawaii_association.rb', line 19 def initialize(model, type) @model, @type = model, type end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *scope, **opts, &extension) ⇒ Object
23 24 25 |
# File 'lib/kawaii_association.rb', line 23 def method_missing(name, *scope, **opts, &extension) @model.method(@type).super_method.call name, *scope, **opts, &extension end |