Module: SimpleCommander

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

Defined Under Namespace

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

Constant Summary collapse

VERSION =
'0.4.0'

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/simple_commander/configure.rb', line 2

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

  configuration_module.class_exec(*configuration_opts, &configuration_block)

  configuration_module.class_exec do
    run!
  end
end