Sha256: 6c034d10685eef829f273212bdf3432e098d7812ab747248d7654f1c13e9d66e

Contents?: true

Size: 601 Bytes

Versions: 1

Compression:

Stored size: 601 Bytes

Contents

module MoneyS3
  module Parsers
    class VzorKomponentaType
      include ParserCore::BaseParser

      def header
        submodel_at(HeaderKusovnikType, 'Header')
      end

      def child
        submodel_at(ChildKusovnikType, 'Child')
      end

      def km_karta
        submodel_at(KmKartaType, 'KmKarta')
      end

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

        hash[:header] = header.to_h if has? 'Header'
        hash[:child] = child.to_h if has? 'Child'
        hash[:km_karta] = km_karta.to_h if has? 'KmKarta'

        hash
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-1.0.0 lib/money_s3/parsers/vzor_komponenta_type.rb