class Solve::Demand
Attributes
constraint[R]
The acceptable constraint of the artifact this demand is for
@return [Semverse::Constraint]
name[R]
The name of the artifact this demand is for
@return [String]
solver[R]
A reference to the solver this demand belongs to
@return [Solve::RubySolver,Solve::GecodeSolver]
Public Class Methods
new(solver, name, constraint = Semverse::DEFAULT_CONSTRAINT)
click to toggle source
@param [Solve::RubySolver,Solve::GecodeSolver] solver @param [#to_s] name @param [Semverse::Constraint, to_s
] constraint
# File lib/solve/demand.rb, line 21 def initialize(solver, name, constraint = Semverse::DEFAULT_CONSTRAINT) @solver = solver @name = name @constraint = Semverse::Constraint.coerce(constraint) end
Public Instance Methods
==(other)
click to toggle source
# File lib/solve/demand.rb, line 31 def ==(other) other.is_a?(self.class) && name == other.name && constraint == other.constraint end
Also aliased as: eql?
to_s()
click to toggle source
# File lib/solve/demand.rb, line 27 def to_s "#{name} (#{constraint})" end