Method: Bundler::RemoteSpecification#sort_obj

Defined in:
lib/bundler/remote_specification.rb

#sort_objArray

Create a delegate used for sorting. This strategy is copied from RubyGems 2.23 and ensures that Bundler’s specifications can be compared and sorted with RubyGems’ own specifications.

Returns:

  • (Array)

    an object you can use to compare and sort this specification against other specifications

See Also:

  • #<=>
  • Gem::Specification#sort_obj


70
71
72
# File 'lib/bundler/remote_specification.rb', line 70

def sort_obj
  [@name, @version, @platform == Gem::Platform::RUBY ? -1 : 1]
end