Class: PryGem::GemList
- Inherits:
-
Pry::ClassCommand
- Object
- Pry::ClassCommand
- PryGem::GemList
- Defined in:
- lib/pry-gem/gem_list.rb
Overview
Instance Method Summary collapse
Instance Method Details
#process(pattern = nil) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/pry-gem/gem_list.rb', line 15 def process(pattern = nil) gems(pattern).each do |gem, specs| sort_specs!(specs) versions = specs.each_with_index.map do |spec, index| index == 0 ? bright_green(spec.version.to_s) : green(spec.version.to_s) end output.puts "#{default gem} (#{versions.join ', '})" end end |