Method: Bundler::Thor.register
- Defined in:
- lib/bundler/vendor/thor/lib/thor.rb
.register(klass, subcommand_name, usage, description, options = {}) ⇒ Object
Registers another Bundler::Thor subclass as a command.
Parameters
- klass<Class>
-
Bundler::Thor subclass to register
- command<String>
-
Subcommand name to use
- usage<String>
-
Short usage for the subcommand
- description<String>
-
Description for the subcommand
37 38 39 40 41 42 43 44 45 |
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 37 def register(klass, subcommand_name, usage, description, = {}) if klass <= Bundler::Thor::Group desc usage, description, define_method(subcommand_name) { |*args| invoke(klass, args) } else desc usage, description, subcommand subcommand_name, klass end end |