module Thor::Actions::ClassMethods
def add_runtime_options!
Add runtime options that help actions execution.
def add_runtime_options! class_option :pretend, :type => :boolean, :aliases => "-p", :group => :runtime, :desc => "Run but do not make any changes" class_option :force, :type => :boolean, :aliases => "-f", :group => :runtime, :desc => "Overwrite files that already exist" class_option :skip, :type => :boolean, :aliases => "-s", :group => :runtime, :desc => "Skip files that already exist" class_option :quiet, :type => :boolean, :aliases => "-q", :group => :runtime, :desc => "Supress status output" end
def source_paths
inherited paths and the source root.
method responsible to gather source_paths from this current class,
Hold source paths for one Thor instance. source_paths_for_search is the
def source_paths @source_paths ||= [] end
def source_paths_for_search
3) Parents source paths
2) Source root
1) This class source paths
Returns the source paths in the following order:
def source_paths_for_search paths = [] paths += self.source_paths paths << self.source_root if self.respond_to?(:source_root) paths += from_superclass(:source_paths, []) paths end