Class: MoneyS3::Parsers::Vlajky

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

Instance Method Summary collapse

Instance Method Details

#globalObject



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

def global
  submodel_at(VlajkaType, 'Global')
end

#to_hObject



14
15
16
17
18
19
20
21
22
# File 'lib/money_s3/parsers/vlajky.rb', line 14

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

  hash[:global] = global.to_h if has? 'Global'
  hash[:user] = user.to_h if has? 'User'

  hash
end

#userObject



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

def user
  submodel_at(VlajkaType, 'User')
end