Sha256: d974e6536423bd97c8d524b21bc8478eef5e66999f89f1b3abfc1b74158a21a0

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

module MoneyS3
  module Parsers
    class VazbaType
      include ParserCore::BaseParser

      def typ
        at 'Typ'
      end

      def pod_typ
        at 'PodTyp'
      end

      def doklad
        submodel_at(Doklad, 'Doklad')
      end

      def to_h_with_attrs
        hash = ParserCore::HashWithAttributes.new({}, attributes)

        hash[:typ] = typ if has? 'Typ'
        hash[:pod_typ] = pod_typ if has? 'PodTyp'
        hash[:doklad] = doklad.to_h_with_attrs if has? 'Doklad'

        hash
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
money_s3-0.12.0 lib/money_s3/parsers/vazba_type.rb
money_s3-0.11.0 lib/money_s3/parsers/vazba_type.rb