Flowdock
class
Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Superclass: Object

A Requirement is a set of one or more version restrictions. It supports a few (=, !=, >, <, >=, <=, ~>) different restriction operators.

See Gem::Version for a description on how versions and requirements work together in RubyGems.

Constants

DefaultRequirement = [">=", Gem::Version.new(0)]

PATTERN = /\A#{PATTERN_RAW}\z/

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Gem::Version::VERSION_PATTERN})\\s*"

SOURCE_SET_REQUIREMENT = Struct.new(:for_lockfile).new "!"

OPS = { #:nodoc: "=" => lambda { |v, r| v == r }, "!=" => lambda { |v, r| v != r }, ">" => lambda { |v, r| v > r }, "<" => lambda { |v, r| v < r }, ">=" => lambda { |v, r| v >= r }, "<=" => lambda { |v, r| v <= r }, "~>" => lambda { |v, r| v >= r && v.release < r.bump } }

Attributes

[R] requirements

An array of requirement pairs. The first element of the pair is the op, and the second is the Gem::Version.

Show files where this class is defined (1 file)
Register or log in to add new notes.