method
new
v2_6_3 -
Show latest stable
- Class:
Gem::Commands::ContentsCommand
new()public
No documentation available.
# File lib/rubygems/commands/contents_command.rb, line 10
def initialize
super 'contents', 'Display the contents of the installed gems',
:specdirs => [], :lib_only => false, :prefix => true,
:show_install_dir => false
add_version_option
add_option( '--all',
"Contents for all gems") do |all, options|
options[:all] = all
end
add_option('-s', '--spec-dir a,b,c', Array,
"Search for gems under specific paths") do |spec_dirs, options|
options[:specdirs] = spec_dirs
end
add_option('-l', '--[no-]lib-only',
"Only return files in the Gem's lib_dirs") do |lib_only, options|
options[:lib_only] = lib_only
end
add_option( '--[no-]prefix',
"Don't include installed path prefix") do |prefix, options|
options[:prefix] = prefix
end
add_option( '--[no-]show-install-dir',
'Show only the gem install dir') do |show, options|
options[:show_install_dir] = show
end
@path_kind = nil
@spec_dirs = nil
@version = nil
end