Sha256: 644e11e2759810d3e616d6a389cd806fe0c75af74a7cf861d13ba770128d2339

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

require 'money_s3/parsers/base_parser'
require 'money_s3/parsers/child_kusovnik_type'
require 'money_s3/parsers/reference'

module MoneyS3
  module Parsers
    class KomponentaKusovnikType
      include BaseParser

      def child
        submodel_at(ChildKusovnikType, 'Child')
      end

      def reference
        submodel_at(Reference, 'Reference')
      end

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

        hash[:child] = child.to_h_with_attrs if has? 'Child'
        hash[:reference] = reference.to_h_with_attrs if has? 'Reference'

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