Class: Moneylovercli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Moneylovercli::CLI
- Defined in:
- lib/moneylovercli/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#add_transaction ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/moneylovercli/cli.rb', line 25 def add_transaction(*) if [:help] invoke :help, ['add_transaction'] else require_relative 'commands/add_transaction' Moneylovercli::Commands::AddTransaction.new().execute end end |
#login ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/moneylovercli/cli.rb', line 37 def login(*) if [:help] invoke :help, ['login'] else require_relative 'commands/login' Moneylovercli::Commands::Login.new().execute end end |
#version ⇒ Object
16 17 18 19 |
# File 'lib/moneylovercli/cli.rb', line 16 def version require_relative 'version' puts "v#{Moneylovercli::VERSION}" end |
#wallets ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/moneylovercli/cli.rb', line 53 def wallets(*) if [:help] invoke :help, ['wallets'] else require_relative 'commands/wallets' Moneylovercli::Commands::Wallets.new().execute end end |