Class: Pike13::CLI::Commands::Desk::Event
- Defined in:
- lib/pike13/cli/commands/desk/event.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/event.rb', line 9 def self.base_usage "desk events" end |
Instance Method Details
#get(id) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/pike13/cli/commands/desk/event.rb', line 33 def get(id) handle_error do result = Pike13::Desk::Event.find(id) output(result) end end |
#list ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pike13/cli/commands/desk/event.rb', line 20 def list validate_event_date_formats handle_error do params = build_event_params result = with_progress("Fetching events") do Pike13::Desk::Event.all(**params) end output(result) end end |