Class: FixtureLoaders::PropertyDefinitionLoader
- Defined in:
- lib/mingle_macro_development_toolkit/loaders/fixture_loaders/property_definition_loader.rb
Instance Method Summary collapse
Methods inherited from Base
#initialize, #load_fixtures_for, #match?
Constructor Details
This class inherits a constructor from FixtureLoaders::Base
Instance Method Details
#load ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/mingle_macro_development_toolkit/loaders/fixture_loaders/property_definition_loader.rb', line 8 def load record = load_fixtures_for('property_definitions').find { |pd| match?(pd)} property_definition = Mingle::PropertyDefinition.new(OpenStruct.new(record)) property_definition.card_types_property_definitions_loader = CardTypesPropertyDefinitionsLoader.new('property_definition_id' => record['id']) property_definition.values_loader = PropertyValuesLoader.new('property_definition_id' => record['id']) property_definition end |
#property_definition ⇒ Object
4 5 6 |
# File 'lib/mingle_macro_development_toolkit/loaders/fixture_loaders/property_definition_loader.rb', line 4 def property_definition @property_definition ||= load end |