class MatchyMatchy::Target
Represents a target in the Stable Match
algorithm. A target is largely the same as a candidate, with the addition of the concept of “capacity”: how many candidates the target is willing to accept.
Attributes
capacity[RW]
Public Class Methods
new(object, capacity: 1)
click to toggle source
Initializes the target with an object to wrap, and a capacity.
@param object [Object] The object represented by this target @param capacity [Integer] The target’s maximum capacity
Calls superclass method
MatchyMatchy::Candidate::new
# File lib/matchy_matchy/target.rb, line 12 def initialize(object, capacity: 1) super(object) @capacity = capacity end