Module: CP
- Defined in:
- lib/cp.rb,
lib/cp/app.rb,
lib/cp/errors.rb,
lib/cp/option.rb,
lib/cp/command.rb,
lib/cp/version.rb,
lib/cp/highline.rb,
lib/cp/has/options.rb,
lib/cp/has/commands.rb,
lib/cp/options_struct.rb,
lib/cp/runners/cmd_parse.rb
Defined Under Namespace
Modules: Has, Runners
Classes: App, Command, CommandError, HighLine, MissingOptionError, Option, OptionsStruct
Constant Summary
collapse
- VERSION =
"0.0.2.1"
Class Method Summary
collapse
Class Method Details
.extended(instance) ⇒ Object
34
35
36
37
|
# File 'lib/cp.rb', line 34
def self.extended( instance )
is_main = instance.class === Object && instance.inspect === "main"
at_exit { CP::App.run } if is_main
end
|
.included(klass) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/cp.rb', line 25
def self.included( klass )
klass.extend( self )
klass.class_eval do
def self.run
CP::App.run
end
end
end
|