lib/ofx/handler.rb in ofx_ruby-0.0.14 vs lib/ofx/handler.rb in ofx_ruby-0.0.15
- old
+ new
@@ -29,20 +29,20 @@
def end_element(name)
case name
when :STMTTRN
@parser.output[:transactions] = [] unless @parser.output[:transactions]
- @parser.output[:transactions].push(transaction(@transaction))
+ @parser.output[:transactions].push(transaction)
when :LEDGERBAL
@parser.output[:balance] = @balance[:BALAMT]
when :AVAILBAL
@parser.output[:pending] = @balance[:BALAMT] - @parser.output[:balance]
end
end
protected
- def transaction(hash)
+ def transaction
{ type: @transaction[:TRNTYPE], posted: @transaction[:DTPOSTED],
amount: @transaction[:TRNAMT], fitid: @transaction[:FITID],
name: @transaction[:NAME] }
end
end
\ No newline at end of file