Class: Forklift::UI
- Inherits:
-
Thor
- Object
- Thor
- Forklift::UI
- Defined in:
- lib/forklift/ui.rb
Defined Under Namespace
Classes: Remote
Class Method Summary collapse
Instance Method Summary collapse
-
#method_missing(meth, *args) ⇒ Object
If a task is not found on Thor::Runner, method missing is invoked and Thor::Runner is then responsable for finding the task in all classes.
- #start ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
If a task is not found on Thor::Runner, method missing is invoked and Thor::Runner is then responsable for finding the task in all classes.
15 16 17 18 19 20 |
# File 'lib/forklift/ui.rb', line 15 def method_missing(meth, *args) meth = meth.to_s klass, task = Thor::Util.find_class_and_task_by_namespace(meth) args.unshift(task) if task klass.start(args, :shell => self.shell) end |
Class Method Details
.banner(task, all = false, subcommand = false) ⇒ Object
22 23 24 |
# File 'lib/forklift/ui.rb', line 22 def self.(task, all = false, subcommand = false) "forklift " + task.formatted_usage(self, all, subcommand) end |