Thor::Actions::ClassMethods

Public Instance Methods

add_runtime_options!() click to toggle source

Add runtime options that help actions execution.

    # File lib/thor/actions.rb, line 40
40:       def add_runtime_options!
41:         class_option :pretend, :type => :boolean, :aliases => "-p", :group => :runtime,
42:                                :desc => "Run but do not make any changes"
43: 
44:         class_option :force, :type => :boolean, :aliases => "-f", :group => :runtime,
45:                              :desc => "Overwrite files that already exist"
46: 
47:         class_option :skip, :type => :boolean, :aliases => "-s", :group => :runtime,
48:                             :desc => "Skip files that already exist"
49: 
50:         class_option :quiet, :type => :boolean, :aliases => "-q", :group => :runtime,
51:                              :desc => "Supress status output"
52:       end
source_paths() click to toggle source

Hold source paths for one Thor instance. source_paths_for_search is the method responsible to gather source_paths from this current class, inherited paths and the source root.

    # File lib/thor/actions.rb, line 20
20:       def source_paths
21:         @source_paths ||= []
22:       end
source_paths_for_search() click to toggle source

Returns the source paths in the following order:

  1) This class source paths
  2) Source root
  3) Parents source paths
    # File lib/thor/actions.rb, line 30
30:       def source_paths_for_search
31:         paths = []
32:         paths += self.source_paths
33:         paths << self.source_root if self.respond_to?(:source_root)
34:         paths += from_superclass(:source_paths, [])
35:         paths
36:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.