Class: Norma43::Models::AdditionalItem

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

Instance Method Summary collapse

Methods included from Mixins::AttributesAssignment

#attributes, #attributes=

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_codeObject

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_1Object

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_2Object

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