Class: ShopifyCli::SubCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/shopify-cli/sub_command.rb

Instance Attribute Summary

Attributes inherited from Command

#ctx, #options

Class Method Summary collapse

Methods inherited from Command

call_help, #initialize, options, prerequisite_task, run_prerequisites, subcommand, subcommand_registry

Methods included from Feature::Set

#hidden?, #hidden_feature

Constructor Details

This class inherits a constructor from ShopifyCli::Command

Class Method Details

.call(args, command_name, parent_command) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/shopify-cli/sub_command.rb', line 7

def call(args, command_name, parent_command)
  cmd = new(@ctx)
  args = cmd.options.parse(@_options, args[1..-1] || [])
  return call_help(parent_command, command_name) if cmd.options.help
  run_prerequisites
  cmd.call(args, command_name)
end