Sha256: 20600aea320b3ef3309c0c05a3a2773dc75977142c577bdc50403f224b52b1df

Contents?: true

Size: 923 Bytes

Versions: 2

Compression:

Stored size: 923 Bytes

Contents

module MoneyS3
  module Parsers
    class ObdobiDPH2
      include ParserCore::BaseParser

      def datum_od
        at 'DatumOd'
      end

      def poh_d_1
        at 'PohD_1'
      end

      def poh_d_2
        at 'PohD_2'
      end

      def poh_d_3
        at 'PohD_3'
      end

      def poh_d_4
        at 'PohD_4'
      end

      def poh_d_5
        at 'PohD_5'
      end

      def poh_d_6
        at 'PohD_6'
      end

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

        hash[:datum_od] = datum_od if has? 'DatumOd'
        hash[:poh_d_1] = poh_d_1 if has? 'PohD_1'
        hash[:poh_d_2] = poh_d_2 if has? 'PohD_2'
        hash[:poh_d_3] = poh_d_3 if has? 'PohD_3'
        hash[:poh_d_4] = poh_d_4 if has? 'PohD_4'
        hash[:poh_d_5] = poh_d_5 if has? 'PohD_5'
        hash[:poh_d_6] = poh_d_6 if has? 'PohD_6'

        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/obdobi_dph2.rb
money_s3-0.11.0 lib/money_s3/parsers/obdobi_dph2.rb