Class: Gem::Commands::WhoisCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::WhoisCommand
- Defined in:
- lib/gem/commands/whois_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ WhoisCommand
constructor
A new instance of WhoisCommand.
Constructor Details
#initialize ⇒ WhoisCommand
Returns a new instance of WhoisCommand.
8 9 10 |
# File 'lib/gem/commands/whois_command.rb', line 8 def initialize super 'whois', 'Show information about the owner of a gem' end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/gem/commands/whois_command.rb', line 12 def execute require 'rest-client' name = get_one_gem_name Gem.sources.each { |source| whois_from_source(name, source) } rescue Exception => ex puts "Unhandled Exception: #{ex.class} #{ex.}" end |