Method: Foreman::Thor::Shell#initialize
- Defined in:
- lib/foreman/vendor/thor/lib/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 < Foreman::Thor
argument :first, :type => :numeric
end
MyScript.new [1.0], { :foo => :bar }, :shell => Foreman::Thor::Shell::Basic.new
44 45 46 47 48 |
# File 'lib/foreman/vendor/thor/lib/thor/shell.rb', line 44 def initialize(args = [], = {}, config = {}) super self.shell = config[:shell] shell.base ||= self if shell.respond_to?(:base) end |