Class: Gem::Commands::EtagsCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::EtagsCommand
- Defined in:
- lib/rubygems/commands/etags_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ EtagsCommand
constructor
A new instance of EtagsCommand.
Constructor Details
#initialize ⇒ EtagsCommand
Returns a new instance of EtagsCommand.
4 5 6 |
# File 'lib/rubygems/commands/etags_command.rb', line 4 def initialize super 'etags', 'Generate etags for gems' end |
Instance Method Details
#execute ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rubygems/commands/etags_command.rb', line 8 def execute Gem::Specification.each do |spec| Dir.chdir(spec.full_gem_path) do unless File.exist?('TAGS') say "Generating etags for #{spec.full_name}" system('ctags', '-eR', *spec.require_paths) end end end end |