Class: Her::Model::Associations::AssociationProxy
- Inherits:
-
Object
- Object
- Her::Model::Associations::AssociationProxy
show all
- Defined in:
- lib/castle-her/model/associations/association_proxy.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/castle-her/model/associations/association_proxy.rb', line 30
def method_missing(name, *args, &block)
if :object_id == name return association.fetch.object_id
end
AssociationProxy.install_proxy_methods 'association.fetch', name
__send__(name, *args, &block)
end
|
Instance Method Details
#association ⇒ Object
25
26
27
|
# File 'lib/castle-her/model/associations/association_proxy.rb', line 25
def association
@_her_association
end
|