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 50
50:       def add_runtime_options!
51:         class_option :force, :type => :boolean, :aliases => "-f", :group => :runtime,
52:                              :desc => "Overwrite files that already exist"
53: 
54:         class_option :pretend, :type => :boolean, :aliases => "-p", :group => :runtime,
55:                                :desc => "Run but do not make any changes"
56: 
57:         class_option :quiet, :type => :boolean, :aliases => "-q", :group => :runtime,
58:                              :desc => "Supress status output"
59: 
60:         class_option :skip, :type => :boolean, :aliases => "-s", :group => :runtime,
61:                             :desc => "Skip files that already exist"
62:       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 24
24:       def source_paths
25:         @_source_paths ||= []
26:       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 40
40:       def source_paths_for_search
41:         paths = []
42:         paths += self.source_paths
43:         paths << self.source_root if self.source_root
44:         paths += from_superclass(:source_paths, [])
45:         paths
46:       end
source_root(path=nil) click to toggle source

Stores and return the source root for this class

    # File lib/thor/actions.rb, line 29
29:       def source_root(path=nil)
30:         @_source_root = path if path
31:         @_source_root
32:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.