class FixtureLoaders::CardTypesPropertyDefinitionsLoader

Public Instance Methods

load() click to toggle source
# 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