Class: Gem::Commands::DescCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::DescCommand
- Defined in:
- lib/rubygems_plugin.rb
Instance Method Summary collapse
-
#arguments ⇒ Object
:nodoc:.
- #execute ⇒ Object
-
#initialize ⇒ DescCommand
constructor
A new instance of DescCommand.
-
#usage ⇒ Object
:nodoc:.
Constructor Details
#initialize ⇒ DescCommand
Returns a new instance of DescCommand.
24 25 26 27 |
# File 'lib/rubygems_plugin.rb', line 24 def initialize super 'desc', 'Get description of a gem given its name', :version => Gem::Requirement.default end |
Instance Method Details
#arguments ⇒ Object
:nodoc:
29 30 31 |
# File 'lib/rubygems_plugin.rb', line 29 def arguments # :nodoc: 'GEMNAME name of a gem to describe' end |
#execute ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rubygems_plugin.rb', line 37 def execute name = get_one_gem_name remote_gem = RemoteGem.info_for(name) if remote_gem say "version: #{remote_gem.version}" say "authors: #{remote_gem.}" say "downloads: #{remote_gem.downloads}" say "" say "\t#{remote_gem.info}" else say "Couldn't find #{name} in repository" end end |
#usage ⇒ Object
:nodoc:
33 34 35 |
# File 'lib/rubygems_plugin.rb', line 33 def usage # :nodoc: "#{program_name} GEMNAME [options]" end |