Sha256: 063ccc2143a9c8a08de288d399f098508829166e59d18da8ae6aca897c3d3b2d

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

require 'money_s3/parsers/base_parser'

module MoneyS3
  module Parsers
    class AdresaType
      include BaseParser

      def ulice
        at 'Ulice'
      end

      def misto
        at 'Misto'
      end

      def psc
        at 'PSC'
      end

      def stat
        at 'Stat'
      end

      def kod_statu
        at 'KodStatu'
      end

      def to_h
        hash = WithAttributes.new({})
        hash.attributes = attributes

        hash[:ulice] = ulice if has? 'Ulice'
        hash[:misto] = misto if has? 'Misto'
        hash[:psc] = psc if has? 'PSC'
        hash[:stat] = stat if has? 'Stat'
        hash[:kod_statu] = kod_statu if has? 'KodStatu'

        hash
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.6.0 lib/money_s3/parsers/adresa_type.rb