Class: Stannum::Constraints::Anything
- Defined in:
- lib/stannum/constraints/anything.rb
Overview
An example constraint that matches any object, even nil.
Constant Summary collapse
- NEGATED_TYPE =
The :type of the error generated for a matching object.
'stannum.constraints.anything'
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#matches?(_actual) ⇒ true
(also: #match?)
Returns true 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) ⇒ true Also known as: match?
Returns true for all objects.
23 24 25 |
# File 'lib/stannum/constraints/anything.rb', line 23 def matches?(_actual) true end |