Class: Norma43::Models::AdditionalItem
- Inherits:
-
Object
- Object
- Norma43::Models::AdditionalItem
- Includes:
- Mixins::AttributesAssignment
- Defined in:
- lib/norma43/models/additional_item.rb
Constant Summary
Constants included from Mixins::AttributesAssignment
Mixins::AttributesAssignment::EMPTY_ATTRIBUTES
Instance Attribute Summary collapse
-
#data_code ⇒ Object
Returns the value of attribute data_code.
-
#item_1 ⇒ Object
Returns the value of attribute item_1.
-
#item_2 ⇒ Object
Returns the value of attribute item_2.
Instance Method Summary collapse
-
#initialize(attributes = EMPTY_ATTRIBUTES) ⇒ AdditionalItem
constructor
A new instance of AdditionalItem.
Methods included from Mixins::AttributesAssignment
Constructor Details
#initialize(attributes = EMPTY_ATTRIBUTES) ⇒ AdditionalItem
Returns a new instance of AdditionalItem.
10 11 12 13 14 15 16 17 |
# File 'lib/norma43/models/additional_item.rb', line 10 def initialize(attributes = EMPTY_ATTRIBUTES) @data_code, @item_1, @item_2 = Hash(attributes).values_at( :data_code, :item_1, :item_2) end |
Instance Attribute Details
#data_code ⇒ Object
Returns the value of attribute data_code.
8 9 10 |
# File 'lib/norma43/models/additional_item.rb', line 8 def data_code @data_code end |
#item_1 ⇒ Object
Returns the value of attribute item_1.
8 9 10 |
# File 'lib/norma43/models/additional_item.rb', line 8 def item_1 @item_1 end |
#item_2 ⇒ Object
Returns the value of attribute item_2.
8 9 10 |
# File 'lib/norma43/models/additional_item.rb', line 8 def item_2 @item_2 end |