Class: ActiveFactory::Linker
- Inherits:
-
Object
- Object
- ActiveFactory::Linker
- Defined in:
- lib/active_factory.rb
Overview
provides syntax to create associations between models
Instance Attribute Summary collapse
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#model_class ⇒ Object
Returns the value of attribute model_class.
Instance Method Summary collapse
- #-(that) ⇒ Object
-
#initialize(container, use_association = nil) ⇒ Linker
constructor
A new instance of Linker.
Constructor Details
#initialize(container, use_association = nil) ⇒ Linker
Returns a new instance of Linker.
258 259 260 261 262 263 264 265 |
# File 'lib/active_factory.rb', line 258 def initialize container, use_association = nil @container = container @use_association = use_association @entries = container.entries @model_class = container.factory.model_class @prefer_associations = container.factory.prefer_associations end |
Instance Attribute Details
#entries ⇒ Object
Returns the value of attribute entries.
267 268 269 |
# File 'lib/active_factory.rb', line 267 def entries @entries end |
#model_class ⇒ Object
Returns the value of attribute model_class.
267 268 269 |
# File 'lib/active_factory.rb', line 267 def model_class @model_class end |