class Machete::Matchers::Quantifier

Attributes

matcher[R]

:min should be always set, :max can be nil (meaning infinity)

max[R]

:min should be always set, :max can be nil (meaning infinity)

min[R]

:min should be always set, :max can be nil (meaning infinity)

step[R]

:min should be always set, :max can be nil (meaning infinity)

Public Class Methods

new(matcher, min, max, step) click to toggle source
# File lib/machete/matchers.rb, line 7
def initialize(matcher, min, max, step)
  @matcher, @min, @max, @step = matcher, min, max, step
end

Public Instance Methods

==(other) click to toggle source
# File lib/machete/matchers.rb, line 11
def ==(other)
  other.instance_of?(self.class) &&
    @matcher == other.matcher &&
    @min == other.min &&
    @max == other.max &&
    @step == other.step
end