Class: Stannum::Constraints::Nothing
- Defined in:
- lib/stannum/constraints/nothing.rb
Overview
An example constraint that does not match any object, even nil.
Constant Summary collapse
- TYPE =
The :type of the error generated for a non-matching object.
'stannum.constraints.anything'
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#matches?(_actual) ⇒ false
(also: #match?)
Returns false for all objects.
Methods inherited from Base
#==, #clone, #does_not_match?, #dup, #errors_for, #initialize, #match, #message, #negated_errors_for, #negated_match, #negated_message, #negated_type, #type, #with_options
Constructor Details
This class inherits a constructor from Stannum::Constraints::Base
Instance Method Details
#matches?(_actual) ⇒ false Also known as: match?
Returns false for all objects.
23 24 25 |
# File 'lib/stannum/constraints/nothing.rb', line 23 def matches?(_actual) false end |