Class: Gem::Commands::MateCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::MateCommand
- Defined in:
- lib/rubygems/commands/mate_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ MateCommand
constructor
A new instance of MateCommand.
- #usage ⇒ Object
Constructor Details
#initialize ⇒ MateCommand
Returns a new instance of MateCommand.
4 5 6 |
# File 'lib/rubygems/commands/mate_command.rb', line 4 def initialize super 'mate', 'Open gem source in TextMate' end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 |
# File 'lib/rubygems/commands/mate_command.rb', line 8 def execute index = Gem::SourceIndex.from_installed_gems spec = index.find_name(get_one_gem_name, Gem::Requirement.default).last exec 'mate', spec.full_gem_path end |
#usage ⇒ Object
14 15 16 |
# File 'lib/rubygems/commands/mate_command.rb', line 14 def usage "#{program_name} GEMNAME" end |