Class: MetaField::NodeProxy
- Inherits:
-
Object
- Object
- MetaField::NodeProxy
- Defined in:
- lib/meta_field/proxy.rb
Instance Method Summary collapse
-
#initialize(datatype, obj) ⇒ NodeProxy
constructor
A new instance of NodeProxy.
- #method_missing(action, *args) ⇒ Object
Constructor Details
#initialize(datatype, obj) ⇒ NodeProxy
Returns a new instance of NodeProxy.
14 15 16 17 |
# File 'lib/meta_field/proxy.rb', line 14 def initialize(datatype, obj) @datatype = datatype @obj = obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(action, *args) ⇒ Object
19 20 21 |
# File 'lib/meta_field/proxy.rb', line 19 def method_missing(action, *args) @obj.and(MetaField::Meta.arel_table[@datatype].send(action, *args)) end |