Class: Pike13::CLI::Commands::Desk::Invoice
- Defined in:
- lib/pike13/cli/commands/desk/invoice.rb
Class Method Summary collapse
-
.base_usage ⇒ Object
Override base_usage to match the actual subcommand registration.
Instance Method Summary collapse
Methods inherited from Base
format_options, handle_argument_error, printable_commands
Methods included from ThorNestedSubcommand
Class Method Details
.base_usage ⇒ Object
Override base_usage to match the actual subcommand registration
9 10 11 |
# File 'lib/pike13/cli/commands/desk/invoice.rb', line 9 def self.base_usage "desk invoices" end |
Instance Method Details
#get(id) ⇒ Object
27 28 29 |
# File 'lib/pike13/cli/commands/desk/invoice.rb', line 27 def get(id) handle_error { output(Pike13::Desk::Invoice.find(id)) } end |
#list ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/pike13/cli/commands/desk/invoice.rb', line 16 def list handle_error do result = with_progress("Fetching invoices") do Pike13::Desk::Invoice.all end output(result) end end |