Method: LibGems::Commands::DependencyCommand#initialize

Defined in:
lib/libgems/commands/dependency_command.rb

#initializeDependencyCommand

Returns a new instance of DependencyCommand.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/libgems/commands/dependency_command.rb', line 11

def initialize
  super 'dependency',
        'Show the dependencies of an installed gem',
        :version => LibGems::Requirement.default, :domain => :local

  add_version_option
  add_platform_option
  add_prerelease_option

  add_option('-R', '--[no-]reverse-dependencies',
             'Include reverse dependencies in the output') do
    |value, options|
    options[:reverse_dependencies] = value
  end

  add_option('-p', '--pipe',
             "Pipe Format (name --version ver)") do |value, options|
    options[:pipe_format] = value
  end

  add_local_remote_options
end