Module: Bundler::Thor::Actions::ClassMethods
Relationships & Source Files | |
Defined in: | lib/bundler/vendor/thor/lib/thor/actions.rb |
Instance Method Summary
-
#add_runtime_options!
Add runtime options that help actions execution.
-
#source_paths
Hold source paths for one
::Bundler::Thor
instance. -
#source_paths_for_search
Returns the source paths in the following order:
-
#source_root(path = nil)
Stores and return the source root for this class.
Instance Method Details
#add_runtime_options!
Add runtime options that help actions execution.
# File 'lib/bundler/vendor/thor/lib/thor/actions.rb', line 48
def class_option :force, :type => :boolean, :aliases => "-f", :group => :runtime, :desc => "Overwrite files that already exist" class_option :pretend, :type => :boolean, :aliases => "-p", :group => :runtime, :desc => "Run but do not make any changes" class_option :quiet, :type => :boolean, :aliases => "-q", :group => :runtime, :desc => "Suppress status output" class_option :skip, :type => :boolean, :aliases => "-s", :group => :runtime, :desc => "Skip files that already exist" end
#source_paths
Hold source paths for one ::Bundler::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/bundler/vendor/thor/lib/thor/actions.rb', line 22
def source_paths @_source_paths ||= [] end
#source_paths_for_search
# File 'lib/bundler/vendor/thor/lib/thor/actions.rb', line 38
def source_paths_for_search paths = [] paths += source_paths paths << source_root if source_root paths += from_superclass(:source_paths, []) paths end
#source_root(path = nil)
Stores and return the source root for this class
# File 'lib/bundler/vendor/thor/lib/thor/actions.rb', line 27
def source_root(path = nil) @_source_root = path if path @_source_root ||= nil end