Class: Gem::Commands::WhyCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::WhyCommand
- Defined in:
- lib/rubygems/commands/why_command.rb
Overview
Command to show which gems depend on a specific gem
This command helps identify dependency relationships by showing:
-
Direct dependents (–direct): immediate dependents only
-
Deep dependency chains (default): full dependency chains
-
Tree visualization (–tree): hierarchical view
Instance Method Summary collapse
-
#description ⇒ String
Long description of the command.
-
#execute ⇒ void
Executes the command with the provided arguments.
-
#initialize ⇒ WhyCommand
constructor
Initializes the why command with options.
-
#usage ⇒ String
Usage string for the command.
Constructor Details
#initialize ⇒ WhyCommand
Initializes the why command with options
34 35 36 37 38 |
# File 'lib/rubygems/commands/why_command.rb', line 34 def initialize super("why", "Show which gems depend on a specific gem") initialize_dependencies end |
Instance Method Details
#description ⇒ String
Returns long description of the command.
41 42 43 |
# File 'lib/rubygems/commands/why_command.rb', line 41 def description "Show which installed gems depend on a specific gem, including dependency chains" end |
#execute ⇒ void
This method returns an undefined value.
Executes the command with the provided arguments
52 53 54 55 |
# File 'lib/rubygems/commands/why_command.rb', line 52 def execute gem_name = validate_gem_name route_to_display_mode(gem_name) end |
#usage ⇒ String
Returns usage string for the command.
46 47 48 |
# File 'lib/rubygems/commands/why_command.rb', line 46 def usage "#{program_name} GEMNAME [options]" end |