Class: Pike13::CLI::Commands::Front::PlanProduct
- Defined in:
- lib/pike13/cli/commands/front/plan_product.rb
Class Method Summary collapse
-
.base_usage ⇒ Object
Override the command name display to use “plan_products” instead of “planproduct”.
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 the command name display to use “plan_products” instead of “planproduct”
9 10 11 |
# File 'lib/pike13/cli/commands/front/plan_product.rb', line 9 def self.base_usage "front plan_products" end |
Instance Method Details
#get(id) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/pike13/cli/commands/front/plan_product.rb', line 25 def get(id) handle_error do result = Pike13::Front::PlanProduct.find(id) output(result) end end |
#list ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/pike13/cli/commands/front/plan_product.rb', line 14 def list handle_error do result = with_progress("Fetching plan products") do Pike13::Front::PlanProduct.all end output(result) end end |