Class: Gem::Dependency

Class | Gem::Dependency
In: | lib/rubygems/dependency.rb
Parent: | Object

The Dependency class holds a Gem name and a Gem::Requirement

### Methods

<=> =~ hash new normalize requirement_list requirements_list version_requirements

### Constants

TYPES | = | [ :development, :runtime, ] |  | Valid dependency types.

### Attributes

name | [RW] | Dependency name or regular expression.
type | [R] | Dependency type.
version_requirements | [W] | Dependent versions.

### Public Class methods

new(name, version_requirements, type=:runtime)

Constructs a dependency with `name` and `requirements`.

### Public Instance methods

<=>(other)

Orders dependencies by name only.

=~(other)

Uses this dependency as a pattern to compare to `other`. This dependency will match if the name matches the other‘s name, and other has only an equal version requirement that satisfies this dependency.

hash()

A dependency‘s hash is the sum of the hash of the name, type and version_requirements

normalize()
requirement_list()
requirements_list()

Alias for requirement_list

version_requirements()

[Validate]