Sha256: 7169c54a5b47ab97749348563ba486c8cdce77c6e6f7321b74f35ae0fba9e9aa

Contents?: true

Size: 1.14 KB

Versions: 7

Compression:

Stored size: 1.14 KB

Contents

module MoneyS3
  module Parsers
    class DodavkaType
      include ParserCore::BaseParser

      def oznaceni
        at 'Oznaceni'
      end

      def oznaceni_attributes
        attributes_at 'Oznaceni'
      end

      def dat_exp
        at 'DatExp'
      end

      def dat_exp_attributes
        attributes_at 'DatExp'
      end

      def pocet_mj
        at 'PocetMJ'
      end

      def pocet_mj_attributes
        attributes_at 'PocetMJ'
      end

      def cena
        at 'Cena'
      end

      def cena_attributes
        attributes_at 'Cena'
      end

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

        hash[:oznaceni] = oznaceni if has? 'Oznaceni'
        hash[:oznaceni_attributes] = oznaceni_attributes if has? 'Oznaceni'
        hash[:dat_exp] = dat_exp if has? 'DatExp'
        hash[:dat_exp_attributes] = dat_exp_attributes if has? 'DatExp'
        hash[:pocet_mj] = pocet_mj if has? 'PocetMJ'
        hash[:pocet_mj_attributes] = pocet_mj_attributes if has? 'PocetMJ'
        hash[:cena] = cena if has? 'Cena'
        hash[:cena_attributes] = cena_attributes if has? 'Cena'

        hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/dodavka_type.rb
money_s3-2.4.0 lib/money_s3/parsers/dodavka_type.rb
money_s3-2.3.0 lib/money_s3/parsers/dodavka_type.rb
money_s3-2.2.0 lib/money_s3/parsers/dodavka_type.rb
money_s3-2.1.0 lib/money_s3/parsers/dodavka_type.rb
money_s3-2.0.0 lib/money_s3/parsers/dodavka_type.rb
money_s3-1.0.0 lib/money_s3/parsers/dodavka_type.rb