Class: App::CLI::Dispatcher
- Inherits:
-
Object
- Object
- App::CLI::Dispatcher
- Defined in:
- lib/app-cli.rb
Class Method Summary collapse
Class Method Details
.dispatch(*args) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/app-cli.rb', line 22 def self.dispatch(*args) handler = self.find handler = handler.cascading if handler.cascadable = handler. handler.run( Getopt::Long.getopts(*), args ) end |
.find ⇒ Object
16 17 18 19 20 |
# File 'lib/app-cli.rb', line 16 def self.find subcmd = ARGV.shift subcmd = self.to_s+"::"+subcmd.capitalize eval(subcmd) if class_defined?(subcmd) end |