mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-03 04:25:21 +02:00
Net worth calculation (#508)
* Add classification generated column to account * Add basic net worth calculation * Add net worth tests * Fix lint errors
This commit is contained in:
parent
19f15e9391
commit
facd74f733
12 changed files with 156 additions and 40 deletions
|
@ -1,10 +1,10 @@
|
|||
class Trend
|
||||
attr_reader :current, :previous, :type
|
||||
|
||||
def initialize(current:, previous: nil, type: :asset)
|
||||
def initialize(current:, previous: nil, type: "asset")
|
||||
@current = current
|
||||
@previous = previous
|
||||
@type = type # :asset means positive trend is good, :liability means negative trend is good
|
||||
@type = type # asset means positive trend is good, liability means negative trend is good
|
||||
end
|
||||
|
||||
def direction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue