Class: Mingle::CardTypePropertyDefinition
- Inherits:
-
Object
- Object
- Mingle::CardTypePropertyDefinition
- Defined in:
- lib/mingle_macro_models/card_type_property_definition.rb
Overview
This is a lightweight representation of the relationship between a card_type and a property definition as configured in Mingle.
Instance Attribute Summary collapse
-
#card_type_loader ⇒ Object
writeonly
Sets the attribute card_type_loader.
-
#property_definition_loader ⇒ Object
writeonly
Sets the attribute property_definition_loader.
Instance Method Summary collapse
- #card_type ⇒ Object
-
#initialize(card_type_property_definition) ⇒ CardTypePropertyDefinition
constructor
A new instance of CardTypePropertyDefinition.
- #position ⇒ Object
- #property_definition ⇒ Object
Constructor Details
#initialize(card_type_property_definition) ⇒ CardTypePropertyDefinition
Returns a new instance of CardTypePropertyDefinition.
7 8 9 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 7 def initialize(card_type_property_definition) @card_type_property_definition = card_type_property_definition end |
Instance Attribute Details
#card_type_loader=(value) ⇒ Object (writeonly)
Sets the attribute card_type_loader
23 24 25 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 23 def card_type_loader=(value) @card_type_loader = value end |
#property_definition_loader=(value) ⇒ Object (writeonly)
Sets the attribute property_definition_loader
23 24 25 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 23 def property_definition_loader=(value) @property_definition_loader = value end |
Instance Method Details
#card_type ⇒ Object
15 16 17 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 15 def card_type @card_type_loader.load end |
#position ⇒ Object
11 12 13 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 11 def position @card_type_property_definition.position.to_i end |
#property_definition ⇒ Object
19 20 21 |
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 19 def property_definition @property_definition_loader.load end |