class Stannum::Constraints::Anything
An example constraint that matches any object, even nil.
@example
constraint = Stannum::Constraints::Anything.new constraint.matches?(Object.new) #=> true constraint.does_not_match?(Object.new) #=> false
Constants
- NEGATED_TYPE
The :type of the error generated for a matching object.
Public Instance Methods
matches?(_actual)
click to toggle source
Returns true for all objects.
@return [true] in all cases.
@see Stannum::Constraint#matches?
# File lib/stannum/constraints/anything.rb, line 23 def matches?(_actual) true end
Also aliased as: match?