Sha256: 226f386f7e07de67badd445d6ac8231aa13c59af1133b1746094917aa8d00e73
Contents?: true
Size: 885 Bytes
Versions: 4
Compression:
Stored size: 885 Bytes
Contents
require 'money_s3/parsers/base_parser' require 'money_s3/parsers/header_kusovnik_type' require 'money_s3/parsers/child_kusovnik_type' require 'money_s3/parsers/komponenta_kusovnik_type' module MoneyS3 module Parsers class KusovnikType include BaseParser def header submodel_at(HeaderKusovnikType, 'Header') end def child submodel_at(ChildKusovnikType, 'Child') end def seznam_komponent array_of_at(KomponentaKusovnikType, ['SeznamKomponent', 'Komponenta']) end def to_h_with_attrs hash = HashWithAttributes.new({}, attributes) hash[:header] = header.to_h_with_attrs if has? 'Header' hash[:child] = child.to_h_with_attrs if has? 'Child' hash[:seznam_komponent] = seznam_komponent.map(&:to_h_with_attrs) if has? 'SeznamKomponent' hash end end end end
Version data entries
4 entries across 4 versions & 1 rubygems