Sha256: d96f48616ff0b9020c49fd4ed7749a3a1cdb4af27e9b03fd68fd607a7e09ae5e

Contents?: true

Size: 693 Bytes

Versions: 7

Compression:

Stored size: 693 Bytes

Contents

module MoneyS3
  module Parsers
    class Valuty2
      include ParserCore::BaseParser

      def mena
        submodel_at(MenaType, 'Mena')
      end

      def souhrn_dph
        submodel_at(SouhrnDPHType, 'SouhrnDPH')
      end

      def celkem
        at 'Celkem'
      end

      def celkem_attributes
        attributes_at 'Celkem'
      end

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

        hash[:mena] = mena.to_h if has? 'Mena'
        hash[:souhrn_dph] = souhrn_dph.to_h if has? 'SouhrnDPH'
        hash[:celkem] = celkem if has? 'Celkem'
        hash[:celkem_attributes] = celkem_attributes if has? 'Celkem'

        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/valuty2.rb
money_s3-2.4.0 lib/money_s3/parsers/valuty2.rb
money_s3-2.3.0 lib/money_s3/parsers/valuty2.rb
money_s3-2.2.0 lib/money_s3/parsers/valuty2.rb
money_s3-2.1.0 lib/money_s3/parsers/valuty2.rb
money_s3-2.0.0 lib/money_s3/parsers/valuty2.rb
money_s3-1.0.0 lib/money_s3/parsers/valuty2.rb