Class: MoneyS3::Parsers::ValutyUhr

Inherits:
Object
  • Object
show all
Includes:
ParserCore::BaseParser
Defined in:
lib/money_s3/parsers/valuty_uhr.rb

Instance Method Summary collapse

Instance Method Details

#castkaObject



10
11
12
# File 'lib/money_s3/parsers/valuty_uhr.rb', line 10

def castka
  at 'Castka'
end

#castka_attributesObject



14
15
16
# File 'lib/money_s3/parsers/valuty_uhr.rb', line 14

def castka_attributes
  attributes_at 'Castka'
end

#menaObject



6
7
8
# File 'lib/money_s3/parsers/valuty_uhr.rb', line 6

def mena
  submodel_at(MenaType, 'Mena')
end

#to_hObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/money_s3/parsers/valuty_uhr.rb', line 18

def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:mena] = mena.to_h if has? 'Mena'
  hash[:castka] = castka if has? 'Castka'
  hash[:castka_attributes] = castka_attributes if has? 'Castka'

  hash
end