Class: ShopifyCLI::Command::SubCommand

Inherits:
ShopifyCLI::Command show all
Defined in:
lib/shopify_cli/command/sub_command.rb

Instance Attribute Summary

Attributes inherited from ShopifyCLI::Command

#ctx, #options

Class Method Summary collapse

Methods inherited from ShopifyCLI::Command

call_help, check_node_version, check_ruby_version, check_version, #initialize, options, prerequisite_task, recommend_default_node_range, recommend_default_ruby_range, recommend_node, recommend_ruby, 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



8
9
10
11
12
13
14
15
16
17
# File 'lib/shopify_cli/command/sub_command.rb', line 8

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

  cmd.call(args, command_name)
end