Class: Gem::ArbitrarySearcher
- Inherits:
-
GemPathSearcher
- Object
- GemPathSearcher
- Gem::ArbitrarySearcher
- Defined in:
- lib/generators/templates/application/common/merb_thor/common.rb
Instance Method Summary collapse
- #init_gemspecs ⇒ Object
-
#initialize(source_index) ⇒ ArbitrarySearcher
constructor
A new instance of ArbitrarySearcher.
Constructor Details
#initialize(source_index) ⇒ ArbitrarySearcher
Returns a new instance of ArbitrarySearcher.
20 21 22 23 |
# File 'lib/generators/templates/application/common/merb_thor/common.rb', line 20 def initialize(source_index) @source_index = source_index super() end |
Instance Method Details
#init_gemspecs ⇒ Object
25 26 27 28 29 |
# File 'lib/generators/templates/application/common/merb_thor/common.rb', line 25 def init_gemspecs @source_index.map { |_, spec| spec }.sort { |a,b| (a.name <=> b.name).nonzero? || (b.version <=> a.version) } end |