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
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
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
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.