Module: Pomodoro::Formats::Review::Plugins::Expenses

Defined in:
lib/pomodoro/formats/review/plugins/expenses.rb

Overview

TODO: Add totals: PLN 10 lunch USD 9 domain Total USD: 9 Total PLN: 10 Overall total: 14 USD

Don't parse it, it'd be updated from the data. ! No, do parse it for the total in our base currency, so we don't have to dig online historic data or cash it elsewhere.

Defined Under Namespace

Classes: Expense, Expenses, Parser, Transformer

Class Method Summary collapse

Class Method Details

.parse(string) ⇒ Object


45
46
47
48
49
# File 'lib/pomodoro/formats/review/plugins/expenses.rb', line 45

def self.parse(string)
  tree = Parser.new.parse(string)
  nodes = Transformer.new.apply(tree)
  Expenses.new(nodes.empty? ? Array.new : nodes)
end