Class: Gem::Specification

### Home Classes Methods

### In Files

- lib/extlib/rubygems.rb

### Parent

Object

### Methods

- #sort_obj

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- Extlib
- Extlib::Assertions
- Extlib::ByteArray
- Extlib::Hook
- Extlib::Hook::ClassMethods
- Extlib::Inflection
- Extlib::LocalObjectSpace
- Extlib::Logger
- Extlib::Pooling
- Extlib::Pooling::InvalidResourceError
- Extlib::Pooling::Pool
- Extlib::SimpleSet
- Gem
- Gem::SourceIndex
- Gem::Specification
- LazyModule
- LazyModule::ClassMethods
- Array
- Class
- DateTime
- Dictionary
- FalseClass
- Hash
- LazyArray
- Mash
- Module
- NilClass
- Numeric
- Object
- ObjectSpace
- Pathname
- REXMLUtilityNode
- String
- Struct
- Symbol
- Time
- ToHashParser
- TrueClass
- VirtualFile

No matching classes.

# Gem::Specification

### Public Instance Methods

sort_obj() click to toggle source

Overwrite this so that gems in the gems directory get preferred over gems from any other location. If there are two gems of different versions in the gems directory, the later one will load as usual.

@return [Array<Array>] The object used for sorting gem specs.

    # File lib/extlib/rubygems.rb, line 34
    def sort_obj
      [@name, installation_path == File.join(defined?(Merb) && Merb.respond_to?(:root) ? Merb.root : Dir.pwd,"gems") ? 1 : -1, @version.to_ints, @new_platform == Gem::Platform::RUBY ? -1 : 1]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.