Class: MoneyS3::Parsers::CenaType

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

Instance Method Summary collapse

Instance Method Details

#cenaObject



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

def cena
  at 'Cena'
end

#cena_attributesObject



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

def cena_attributes
  attributes_at 'Cena'
end

#limitObject



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

def limit
  at 'Limit'
end

#limit_attributesObject



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

def limit_attributes
  attributes_at 'Limit'
end

#slevaObject



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

def sleva
  at 'Sleva'
end

#sleva_attributesObject



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

def sleva_attributes
  attributes_at 'Sleva'
end

#to_hObject



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/money_s3/parsers/cena_type.rb', line 30

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

  hash[:limit] = limit if has? 'Limit'
  hash[:limit_attributes] = limit_attributes if has? 'Limit'
  hash[:cena] = cena if has? 'Cena'
  hash[:cena_attributes] = cena_attributes if has? 'Cena'
  hash[:sleva] = sleva if has? 'Sleva'
  hash[:sleva_attributes] = sleva_attributes if has? 'Sleva'

  hash
end