Class: LazyFixtures::FactoryGirl::AssociationManager
- Inherits:
-
Object
- Object
- LazyFixtures::FactoryGirl::AssociationManager
- Includes:
- ObjectHelper
- Defined in:
- lib/lazy_fixtures/factory_girl/association_manager.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #get_associations ⇒ Object
-
#initialize(object) ⇒ AssociationManager
constructor
A new instance of AssociationManager.
Methods included from ObjectHelper
Constructor Details
#initialize(object) ⇒ AssociationManager
Returns a new instance of AssociationManager.
7 8 9 10 |
# File 'lib/lazy_fixtures/factory_girl/association_manager.rb', line 7 def initialize(object) @object = object @klass = @object.class.name.constantize end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/lazy_fixtures/factory_girl/association_manager.rb', line 6 def object @object end |
Instance Method Details
#get_associations ⇒ Object
12 13 14 15 16 |
# File 'lib/lazy_fixtures/factory_girl/association_manager.rb', line 12 def get_associations columns_info.keys.map do |method| get_object(object.send(method)) end end |