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