Class: MoneyS3::Parsers::KurzRozd

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

Instance Method Summary collapse

Instance Method Details

#castkaObject



22
23
24
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 22

def castka
  at 'Castka'
end

#castka_attributesObject



26
27
28
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 26

def castka_attributes
  attributes_at 'Castka'
end

#dokladObject



38
39
40
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 38

def doklad
  submodel_at(DoklRefType, 'Doklad')
end

#kr_poradiObject



30
31
32
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 30

def kr_poradi
  at 'KRPoradi'
end

#kr_poradi_attributesObject



34
35
36
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 34

def kr_poradi_attributes
  attributes_at 'KRPoradi'
end

#preceneniObject



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

def preceneni
  at 'Preceneni'
end

#preceneni_attributesObject



18
19
20
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 18

def preceneni_attributes
  attributes_at 'Preceneni'
end

#to_hObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/money_s3/parsers/kurz_rozd.rb', line 42

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

  hash[:typ] = typ if has? 'Typ'
  hash[:typ_attributes] = typ_attributes if has? 'Typ'
  hash[:preceneni] = preceneni if has? 'Preceneni'
  hash[:preceneni_attributes] = preceneni_attributes if has? 'Preceneni'
  hash[:castka] = castka if has? 'Castka'
  hash[:castka_attributes] = castka_attributes if has? 'Castka'
  hash[:kr_poradi] = kr_poradi if has? 'KRPoradi'
  hash[:kr_poradi_attributes] = kr_poradi_attributes if has? 'KRPoradi'
  hash[:doklad] = doklad.to_h if has? 'Doklad'

  hash
end

#typObject



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

def typ
  at 'Typ'
end

#typ_attributesObject



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

def typ_attributes
  attributes_at 'Typ'
end