method
new
v2_4_6 -
Show latest stable
-
0 notes -
Class: ContentsCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
new()
public
Hide source
# 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