Module: Commander

Defined in:
lib/commander/runner.rb,
lib/commander/command.rb,
lib/commander/methods.rb,
lib/commander/version.rb,
lib/commander/platform.rb,
lib/commander/configure.rb,
lib/commander/delegates.rb,
lib/commander/help_formatters.rb,
lib/commander/user_interaction.rb,
lib/commander/help_formatters/base.rb,
lib/commander/help_formatters/terminal.rb,
lib/commander/help_formatters/terminal_compact.rb

Defined Under Namespace

Modules: Delegates, HelpFormatter, Methods, Platform, UI Classes: Command, Runner

Constant Summary collapse

VERSION =
'4.3.2'

Class Method Summary collapse

Class Method Details

.configure(*configuration_opts, &configuration_block) ⇒ Object


2
3
4
5
6
7
8
9
10
11
# File 'lib/commander/configure.rb', line 2

def configure(*configuration_opts, &configuration_block)
  configuration_module = Module.new
  configuration_module.extend Commander::Methods

  configuration_module.class_exec(*configuration_opts, &configuration_block)

  configuration_module.class_exec do
    run!
  end
end