Sha256: 4a4be833c192435f873d35f5d2558fa44f8fb9cefa0f622ce85c5cd8f4406b31

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

require 'commander/version'
require 'commander/command'
require 'commander/manager'
require 'commander/help_generators'
require 'commander/core_ext/array'
require 'optparse'

module Commander
  	
	def init_commander(options = {})
		Commander::Manager.instance options
	end
	
	def add_command(command, &block)
		_command = command
		command = Commander::Command.new(_command)
		yield command
		Commander::Manager.instance.add_command command
	end
	alias :command :add_command
	
	def get_command(command)
		Commander::Manager.instance.get_command command
	end
	
	def command_exists?(command)
		Commander::Manager.instance.include? command
	end
	
	def info(option)
		Commander::Manager.instance.info[option]
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
visionmedia-commander-1.2.2 lib/commander/commander.rb