Class: FmStore::Associations::BelongsTo
- Defined in:
- lib/fm_store/associations/belongs_to.rb
Instance Attribute Summary collapse
-
#association_name ⇒ Object
Returns the value of attribute association_name.
-
#klass ⇒ Object
Returns the value of attribute klass.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(layout, options) ⇒ BelongsTo
constructor
A new instance of BelongsTo.
Methods inherited from Proxy
Constructor Details
#initialize(layout, options) ⇒ BelongsTo
Returns a new instance of BelongsTo.
8 9 10 11 12 13 14 |
# File 'lib/fm_store/associations/belongs_to.rb', line 8 def initialize(layout, ) @layout, @association_name = layout, .name @klass, @reference_key, @options = .klass, .reference_key, @format_with = .format_with build_parent end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FmStore::Associations::Proxy
Instance Attribute Details
#association_name ⇒ Object
Returns the value of attribute association_name.
6 7 8 |
# File 'lib/fm_store/associations/belongs_to.rb', line 6 def association_name @association_name end |
#klass ⇒ Object
Returns the value of attribute klass.
6 7 8 |
# File 'lib/fm_store/associations/belongs_to.rb', line 6 def klass @klass end |