Sha256: 1e15f5c997484901ed0766f258fc3e5c314ef83ce8ecc0895b01e2c2032a1b54

Contents?: true

Size: 1.47 KB

Versions: 4

Compression:

Stored size: 1.47 KB

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class ObdobiDPH
      include BaseParser

      def datum_od
        at 'DatumOd'
      end

      def uc_md_1
        at 'UcMD_1'
      end

      def uc_d_1
        at 'UcD_1'
      end

      def uc_md_2
        at 'UcMD_2'
      end

      def uc_d_2
        at 'UcD_2'
      end

      def uc_md_3
        at 'UcMD_3'
      end

      def uc_d_3
        at 'UcD_3'
      end

      def uc_md_4
        at 'UcMD_4'
      end

      def uc_d_4
        at 'UcD_4'
      end

      def uc_md_5
        at 'UcMD_5'
      end

      def uc_d_5
        at 'UcD_5'
      end

      def uc_md_6
        at 'UcMD_6'
      end

      def uc_d_6
        at 'UcD_6'
      end

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

        hash[:datum_od] = datum_od if has? 'DatumOd'
        hash[:uc_md_1] = uc_md_1 if has? 'UcMD_1'
        hash[:uc_d_1] = uc_d_1 if has? 'UcD_1'
        hash[:uc_md_2] = uc_md_2 if has? 'UcMD_2'
        hash[:uc_d_2] = uc_d_2 if has? 'UcD_2'
        hash[:uc_md_3] = uc_md_3 if has? 'UcMD_3'
        hash[:uc_d_3] = uc_d_3 if has? 'UcD_3'
        hash[:uc_md_4] = uc_md_4 if has? 'UcMD_4'
        hash[:uc_d_4] = uc_d_4 if has? 'UcD_4'
        hash[:uc_md_5] = uc_md_5 if has? 'UcMD_5'
        hash[:uc_d_5] = uc_d_5 if has? 'UcD_5'
        hash[:uc_md_6] = uc_md_6 if has? 'UcMD_6'
        hash[:uc_d_6] = uc_d_6 if has? 'UcD_6'

        hash
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/parsers/obdobi_dph.rb
money_s3-0.9.0 lib/money_s3/parsers/obdobi_dph.rb
money_s3-0.8.0 lib/money_s3/parsers/obdobi_dph.rb
money_s3-0.7.0 lib/money_s3/parsers/obdobi_dph.rb