Class: Teri::CLI
- Inherits:
-
Thor
- Object
- Thor
- Teri::CLI
- Defined in:
- lib/teri/cli.rb
Instance Method Summary collapse
- #balance_sheet ⇒ Object
- #check_uncoded ⇒ Object
- #close_year ⇒ Object
- #code ⇒ Object
- #fix_balance ⇒ Object
- #income_statement ⇒ Object
- #version ⇒ Object
Instance Method Details
#balance_sheet ⇒ Object
37 38 39 40 |
# File 'lib/teri/cli.rb', line 37 def balance_sheet accounting = Accounting.new() accounting.generate_balance_sheet end |
#check_uncoded ⇒ Object
27 28 29 30 |
# File 'lib/teri/cli.rb', line 27 def check_uncoded accounting = Accounting.new() accounting.check_uncoded_transactions end |
#close_year ⇒ Object
54 55 56 57 58 |
# File 'lib/teri/cli.rb', line 54 def close_year year = [:year] || (Date.today.year - 1) accounting = Accounting.new() accounting.close_year(year) end |
#code ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/teri/cli.rb', line 15 def code # Process options = .dup # Convert disable_ai to use_ai_suggestions [:use_ai_suggestions] = !.delete(:disable_ai) if .key?(:disable_ai) accounting = Accounting.new() accounting.code_transactions end |
#fix_balance ⇒ Object
61 62 63 64 |
# File 'lib/teri/cli.rb', line 61 def fix_balance accounting = Accounting.new() accounting.fix_balance end |
#income_statement ⇒ Object
47 48 49 50 |
# File 'lib/teri/cli.rb', line 47 def income_statement accounting = Accounting.new() accounting.generate_income_statement end |
#version ⇒ Object
67 68 69 |
# File 'lib/teri/cli.rb', line 67 def version puts "Teri version #{Teri::VERSION}" end |