Sha256: 83ba6c8fcd71532a9c02097d28f704eced4a785bfbe695f3e54c555aa28d397e

Contents?: true

Size: 1.31 KB

Versions: 7

Compression:

Stored size: 1.31 KB

Contents

module MoneyS3
  module Parsers
    class AdresaType
      include ParserCore::BaseParser

      def ulice
        at 'Ulice'
      end

      def ulice_attributes
        attributes_at 'Ulice'
      end

      def misto
        at 'Misto'
      end

      def misto_attributes
        attributes_at 'Misto'
      end

      def psc
        at 'PSC'
      end

      def psc_attributes
        attributes_at 'PSC'
      end

      def stat
        at 'Stat'
      end

      def stat_attributes
        attributes_at 'Stat'
      end

      def kod_statu
        at 'KodStatu'
      end

      def kod_statu_attributes
        attributes_at 'KodStatu'
      end

      def to_h
        hash = {}
        hash[:attributes] = attributes

        hash[:ulice] = ulice if has? 'Ulice'
        hash[:ulice_attributes] = ulice_attributes if has? 'Ulice'
        hash[:misto] = misto if has? 'Misto'
        hash[:misto_attributes] = misto_attributes if has? 'Misto'
        hash[:psc] = psc if has? 'PSC'
        hash[:psc_attributes] = psc_attributes if has? 'PSC'
        hash[:stat] = stat if has? 'Stat'
        hash[:stat_attributes] = stat_attributes if has? 'Stat'
        hash[:kod_statu] = kod_statu if has? 'KodStatu'
        hash[:kod_statu_attributes] = kod_statu_attributes if has? 'KodStatu'

        hash
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/parsers/adresa_type.rb
money_s3-2.4.0 lib/money_s3/parsers/adresa_type.rb
money_s3-2.3.0 lib/money_s3/parsers/adresa_type.rb
money_s3-2.2.0 lib/money_s3/parsers/adresa_type.rb
money_s3-2.1.0 lib/money_s3/parsers/adresa_type.rb
money_s3-2.0.0 lib/money_s3/parsers/adresa_type.rb
money_s3-1.0.0 lib/money_s3/parsers/adresa_type.rb