Module: Main
- Defined in:
- lib/main/getoptlong.rb,
lib/main.rb,
lib/main/base.rb,
lib/main/base.rb,
lib/main/cast.rb,
lib/main/util.rb,
lib/main/usage.rb,
lib/main/logger.rb,
lib/main/factories.rb,
lib/main/parameter.rb,
lib/main/softspoken.rb
Overview
Parse command line options just like GNU getopt_long().
Defined Under Namespace
Modules: Cast, Softspoken, Util
Classes: Base, GetoptLong, Logger, Parameter, Usage
Constant Summary
collapse
- LIBDIR =
File.join(File.dirname(File.expand_path(__FILE__)), self.name.downcase, '')
- EXIT_SUCCESS =
0
- EXIT_FAILURE =
1
- EXIT_WARN =
42
Class Method Summary
collapse
Class Method Details
.create(*a, &b) ⇒ Object
2
3
4
|
# File 'lib/main/factories.rb', line 2
def Main.create *a, &b
::Main::Base.create(::Main::Base, *a, &b)
end
|
11
|
# File 'lib/main.rb', line 11
def self.libdir() Main::LIBDIR end
|
.new(*a, &b) ⇒ Object
6
7
8
|
# File 'lib/main/factories.rb', line 6
def Main.new *a, &b
create(::Main::Base, &b).new *a
end
|
.run(argv = ARGV, env = ENV, opts = {}, &block) ⇒ Object
10
11
12
|
# File 'lib/main/factories.rb', line 10
def Main.run argv = ARGV, env = ENV, opts = {}, &block
Base.create(&block).new(argv, env, opts).run
end
|
7
|
# File 'lib/main.rb', line 7
def self.version() Main::VERSION end
|