lib/money_s3/parsers/cinnost.rb in money_s3-0.5.0 vs lib/money_s3/parsers/cinnost.rb in money_s3-0.6.0
- old
+ new
@@ -4,26 +4,27 @@
module Parsers
class Cinnost
include BaseParser
def zkrat
- at :Zkrat
+ at 'Zkrat'
end
def nazev
- at :Nazev
+ at 'Nazev'
end
def pozn
- at :Pozn
+ at 'Pozn'
end
def to_h
- hash = {}
+ hash = WithAttributes.new({})
+ hash.attributes = attributes
- hash[:zkrat] = zkrat if raw.key? :Zkrat
- hash[:nazev] = nazev if raw.key? :Nazev
- hash[:pozn] = pozn if raw.key? :Pozn
+ hash[:zkrat] = zkrat if has? 'Zkrat'
+ hash[:nazev] = nazev if has? 'Nazev'
+ hash[:pozn] = pozn if has? 'Pozn'
hash
end
end
end
\ No newline at end of file