Class: Norma43::Models::AdditionalCurrency

Inherits:
Object
  • Object
show all
Includes:
Mixins::AttributesAssignment
Defined in:
lib/norma43/models/additional_currency.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) ⇒ AdditionalCurrency

Returns a new instance of AdditionalCurrency.



10
11
12
13
14
15
16
17
18
19
# File 'lib/norma43/models/additional_currency.rb', line 10

def initialize(attributes = EMPTY_ATTRIBUTES)
  @data_code,
  @currency_code,
  @amount,
  @free = Hash(attributes).values_at(
    :data_code,
    :currency_code,
    :amount,
    :free)
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



8
9
10
# File 'lib/norma43/models/additional_currency.rb', line 8

def amount
  @amount
end

#currency_codeObject

Returns the value of attribute currency_code.



8
9
10
# File 'lib/norma43/models/additional_currency.rb', line 8

def currency_code
  @currency_code
end

#data_codeObject

Returns the value of attribute data_code.



8
9
10
# File 'lib/norma43/models/additional_currency.rb', line 8

def data_code
  @data_code
end

#freeObject

Returns the value of attribute free.



8
9
10
# File 'lib/norma43/models/additional_currency.rb', line 8

def free
  @free
end