Class: FixtureLoaders::CardTypesPropertyDefinitionsLoader
- Defined in:
- lib/mingle_macro_development_toolkit/loaders/fixture_loaders/card_types_property_definitions_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
4 5 6 7 8 9 10 |
# File 'lib/mingle_macro_development_toolkit/loaders/fixture_loaders/card_types_property_definitions_loader.rb', line 4 def load load_fixtures_for('property_type_mappings').collect do |mapping| pd = PropertyDefinitionLoader.new('id' => mapping['property_definition_id']) if match?(mapping) ct = CardTypeLoader.new('id' => mapping['card_type_id']) if match?(mapping) OpenStruct.new(:card_type => ct.load, :property_definition => pd.load) if ct && pd end.compact end |