class FortuneTeller::Cashflow
Representation of an account being simulated with FortuneTeller
Attributes
line_items[RW]
Public Class Methods
new(**args)
click to toggle source
# File lib/fortuneteller/cashflow.rb, line 5 def initialize(**args) @line_items = args end
Public Instance Methods
as_json(options = nil)
click to toggle source
# File lib/fortuneteller/cashflow.rb, line 14 def as_json(options = nil) @line_items.as_json(options) end
merge!(other)
click to toggle source
# File lib/fortuneteller/cashflow.rb, line 9 def merge!(other) @line_items.merge!(other.line_items) { |_k, a, b| (a + b) } self end