Sha256: a42454632496c4d1855b67b3737ec86c0f9d687a7bc94cf88ece5875f5a7e164

Contents?: true

Size: 863 Bytes

Versions: 4

Compression:

Stored size: 863 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class ParametrType
      include BaseParser

      def id
        at 'ID'
      end

      def nazev
        at 'Nazev'
      end

      def druh
        at 'Druh'
      end

      def typ
        at 'Typ'
      end

      def mj
        at 'MJ'
      end

      def uziv_code
        at 'UzivCode'
      end

      def hodnoty
        at 'Hodnoty'
      end

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

        hash[:id] = id if has? 'ID'
        hash[:nazev] = nazev if has? 'Nazev'
        hash[:druh] = druh if has? 'Druh'
        hash[:typ] = typ if has? 'Typ'
        hash[:mj] = mj if has? 'MJ'
        hash[:uziv_code] = uziv_code if has? 'UzivCode'
        hash[:hodnoty] = hodnoty if has? 'Hodnoty'

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