Sha256: b87f8611368d2d204bdf7823914c64f74055f87ed1e920d6b78631ea13e087a5

Contents?: true

Size: 847 Bytes

Versions: 4

Compression:

Stored size: 847 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/mena_type'

module MoneyS3
  module Parsers
    class CenovaHladinaType
      include BaseParser

      def zkrat
        at 'Zkrat'
      end

      def nazev
        at 'Nazev'
      end

      def pozn
        at 'Pozn'
      end

      def skup
        at 'Skup'
      end

      def ceny
        at 'Ceny'
      end

      def mena
        submodel_at(MenaType, 'Mena')
      end

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

        hash[:zkrat] = zkrat if has? 'Zkrat'
        hash[:nazev] = nazev if has? 'Nazev'
        hash[:pozn] = pozn if has? 'Pozn'
        hash[:skup] = skup if has? 'Skup'
        hash[:ceny] = ceny if has? 'Ceny'
        hash[:mena] = mena.to_h_with_attrs if has? 'Mena'

        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/cenova_hladina_type.rb
money_s3-0.9.0 lib/money_s3/parsers/cenova_hladina_type.rb
money_s3-0.8.0 lib/money_s3/parsers/cenova_hladina_type.rb
money_s3-0.7.0 lib/money_s3/parsers/cenova_hladina_type.rb