Class: Mingle::CardTypePropertyDefinition

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute card_type_loader to.



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

Parameters:

  • value

    the value to set the attribute property_definition_loader to.



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_typeObject



15
16
17
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 15

def card_type
  @card_type_loader.load
end

#positionObject



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_definitionObject



19
20
21
# File 'lib/mingle_macro_models/card_type_property_definition.rb', line 19

def property_definition
  @property_definition_loader.load
end