lib/money_s3/parsers/import2.rb in money_s3-0.12.0 vs lib/money_s3/parsers/import2.rb in money_s3-1.0.0
- old
+ new
@@ -21,17 +21,18 @@
def data
submodel_at(SklDoklType, 'Data')
end
- def to_h_with_attrs
- hash = ParserCore::HashWithAttributes.new({}, attributes)
+ def to_h
+ hash = {}
+ hash[:attributes] = attributes
- hash[:dod_odb] = dod_odb.to_h_with_attrs if has? 'DodOdb'
- hash[:konec_prij] = konec_prij.to_h_with_attrs if has? 'KonecPrij'
- hash[:polozka] = polozka.map(&:to_h_with_attrs) if has? 'Polozka'
- hash[:nep_platba] = nep_platba.map(&:to_h_with_attrs) if has? 'NepPlatba'
- hash[:data] = data.to_h_with_attrs if has? 'Data'
+ hash[:dod_odb] = dod_odb.to_h if has? 'DodOdb'
+ hash[:konec_prij] = konec_prij.to_h if has? 'KonecPrij'
+ hash[:polozka] = polozka.map(&:to_h) if has? 'Polozka'
+ hash[:nep_platba] = nep_platba.map(&:to_h) if has? 'NepPlatba'
+ hash[:data] = data.to_h if has? 'Data'
hash
super.merge(hash)
end
end
\ No newline at end of file