Method: Thor::Shell#initialize
- Defined in:
- lib/wip/vendor/thor/shell.rb
#initialize(args = [], options = {}, config = {}) ⇒ Object
Add shell to initialize config values.
Configuration
- shell<Object>
-
An instance of the shell to be used.
Examples
class MyScript < Thor
argument :first, :type => :numeric
end
MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new
45 46 47 48 49 |
# File 'lib/wip/vendor/thor/shell.rb', line 45 def initialize(args=[], ={}, config={}) super self.shell = config[:shell] self.shell.base ||= self if self.shell.respond_to?(:base) end |