Sha256: c1282635c2225c3f43c2a52640348d34196c09a9ae49dc76e95c4359217420d4

Contents?: true

Size: 484 Bytes

Versions: 3

Compression:

Stored size: 484 Bytes

Contents

lib = File.expand_path('../', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require "mercenary/version"
require "optparse"
require "logger"

module Mercenary
  autoload :Command, "mercenary/command"
  autoload :Program, "mercenary/program"

  # Public: Instantiate a new program and execute.
  #
  # name - the name of your program
  #
  # Returns nothing.
  def self.program(name)
    program = Program.new(name)
    yield program
    program.go(ARGV)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mercenary-0.2.1 lib/mercenary.rb
mercenary-0.2.0 lib/mercenary.rb
mercenary-0.1.0 lib/mercenary.rb