Class: Helm::CLI::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/helm/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.define_from(command_config) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/helm/cli.rb', line 54

def define_from(command_config)
  desc command_config.name.to_s, command_config.description
  command_config.scope_options.each do |name|
    option name, :required => true
  end

  define_method command_config.name do |*args|
    command = Commands::Main::Defined.new(Helm.config, options, command_config)
    command.execute(*args)
  end
end

Instance Method Details

#help(task = nil, subcommand = false) ⇒ Object



67
68
69
70
71
72
# File 'lib/helm/cli.rb', line 67

def help(task = nil, subcommand=false)
  super

  shell.say "Commands are loaded from:"
  shell.say Helm.commands_valise.to_s
end