(Not documented)

Public Class Methods

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

It receives arguments in an Array and two hashes, one for options and other for configuration.

Notice that it does not check if all required arguments were supplied. It should be done by the parser.


args:An array of objects. The objects are applied to their respective accessors declared with argument.
options:An options hash that will be available as self.options. The hash given is converted to a hash with indifferent access, magic predicates (options.skip?) and then frozen.
config:Configuration for this Thor class.
    # File lib/thor/base.rb, line 37
37:     def initialize(args=[], options={}, config={})
38:       Thor::Arguments.parse(self.class.arguments, args).each do |key, value|
39:         send("#{key}=", value)
40:       end
42:       parse_options = self.class.class_options
44:       if options.is_a?(Array)
45:         task_options  = config.delete(:task_options) # hook for start
46:         parse_options = parse_options.merge(task_options) if task_options
47:         array_options, hash_options = options, {}
48:       else
49:         array_options, hash_options = [], options
50:       end
52:       options = Thor::Options.parse(parse_options, array_options)
53:       self.options =!(hash_options)
54:       self.options.freeze
55:     end
shell() click to toggle source

Returns the shell used in all Thor classes. Default to color one.

   # File lib/thor/shell.rb, line 7
7:     def
8:       @shell ||= Thor::Shell::Color
9:     end
shell=(klass) click to toggle source

Sets the shell used in all Thor classes.

    # File lib/thor/shell.rb, line 13
13:     def
14:       @shell = klass
15:     end
subclass_files() click to toggle source

Returns the files where the subclasses are kept.


Hash[path => Class]

    # File lib/thor/base.rb, line 78
78:       def subclass_files
79:         @subclass_files ||={ |h,k| h[k] = [] }
80:       end
subclasses() click to toggle source

Returns the classes that inherits from Thor or Thor::Group.



    # File lib/thor/base.rb, line 69
69:       def subclasses
70:         @subclasses ||= []
71:       end

Disabled; run with --debug to generate this.


Generated with the Darkfish Rdoc Generator 1.1.6.