Sha256: 3fa85c413fc6eb143790fd2cdafc80dc92b176892eb2bdf3cc2d820956eb35e2

Contents?: true

Size: 606 Bytes

Versions: 1

Compression:

Stored size: 606 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/kurz_type'

module MoneyS3
  module Parsers
    class KurzListek
      include BaseParser

      def banka
        at :Banka
      end

      def por_cislo
        at :PorCislo
      end

      def datum
        at :Datum
      end

      def seznam_kurzu
        array_of_at(KurzType, [:SeznamKurzu, :Kurz])
      end

      def to_h
        { banka: banka,
          por_cislo: por_cislo,
          datum: datum,
          seznam_kurzu: seznam_kurzu.map(&:to_h)
        }.delete_if { |k, v| v.nil? || v.empty? }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.4.0 lib/money_s3/parsers/kurz_listek.rb