Class: MoneyS3::Parsers::Control

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

Instance Method Summary collapse

Instance Method Details

#cislo_davkyObject



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

def cislo_davky
  submodel_at(MessageRootType, 'CisloDavky')
end

#hosp_rokObject



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

def hosp_rok
  submodel_at(MessageRootType, 'HospRok')
end

#kod_agendyObject



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

def kod_agendy
  submodel_at(MessageRootType, 'KodAgendy')
end

#to_hObject



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

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

  hash[:cislo_davky] = cislo_davky.to_h if has? 'CisloDavky'
  hash[:kod_agendy] = kod_agendy.to_h if has? 'KodAgendy'
  hash[:hosp_rok] = hosp_rok.to_h if has? 'HospRok'

  hash
end