Namespace

Methods

Thor::Shell

Constants

SHELL_DELEGATED_METHODS
(Not documented)

Public Class Methods

new(args=[], options={}, config={}) click to toggle source

Add shell to initialize config values.

Configuration

shell: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
    # File lib/thor/shell.rb, line 34
34:     def initialize(args=[], options={}, config={})
35:       super
36:       self.shell = config[:shell]
37:       self.shell.base ||= self if self.shell.respond_to?(:base)
38:     end

Public Instance Methods

shell() click to toggle source

Holds the shell for the given Thor instance. If no shell is given, it gets a default shell from Thor::Base.shell.

    # File lib/thor/shell.rb, line 43
43:     def shell
44:       @shell ||= Thor::Base.shell.new
45:     end
shell=(shell) click to toggle source

Sets the shell for this thor class.

    # File lib/thor/shell.rb, line 49
49:     def shell=(shell)
50:       @shell = shell
51:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.