Module: Mercenary

Defined in:
lib/mercenary.rb,
lib/mercenary/option.rb,
lib/mercenary/command.rb,
lib/mercenary/program.rb,
lib/mercenary/version.rb,
lib/mercenary/presenter.rb

Defined Under Namespace

Classes: Command, Option, Presenter, Program

Constant Summary collapse

VERSION =
"0.4.0"

Class Method Summary collapse

Class Method Details

.program(name) {|program| ... } ⇒ Object

Public: Instantiate a new program and execute.

name - the name of your program

Returns nothing.

Yields:



18
19
20
21
22
# File 'lib/mercenary.rb', line 18

def self.program(name)
  program = Program.new(name)
  yield program
  program.go(ARGV)
end