Class: MoneyS3::Parsers::MzdoveObdobiType

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

Instance Method Summary collapse

Instance Method Details

#funkceObject



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

def funkce
  at 'Funkce'
end

#funkce_attributesObject



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

def funkce_attributes
  attributes_at 'Funkce'
end

#mesicObject



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

def mesic
  at 'Mesic'
end

#mesic_attributesObject



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

def mesic_attributes
  attributes_at 'Mesic'
end

#prac_pomerObject



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

def prac_pomer
  submodel_at(PracPomer, 'PracPomer')
end

#rokObject



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

def rok
  at 'Rok'
end

#rok_attributesObject



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

def rok_attributes
  attributes_at 'Rok'
end

#to_hObject



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/money_s3/parsers/mzdove_obdobi_type.rb', line 34

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

  hash[:mesic] = mesic if has? 'Mesic'
  hash[:mesic_attributes] = mesic_attributes if has? 'Mesic'
  hash[:rok] = rok if has? 'Rok'
  hash[:rok_attributes] = rok_attributes if has? 'Rok'
  hash[:funkce] = funkce if has? 'Funkce'
  hash[:funkce_attributes] = funkce_attributes if has? 'Funkce'
  hash[:prac_pomer] = prac_pomer.to_h if has? 'PracPomer'

  hash
end