Class: BloodContracts::Core::Anything
- Defined in:
- lib/blood_contracts/core/anything.rb
Overview
Refinement type which represents data which is always correct
Instance Attribute Summary
Attributes inherited from Refined
Instance Method Summary collapse
-
#match ⇒ BC::Refined
The type which is the result of data matching process (for Anything is always self).
-
#valid? ⇒ Boolean
Checks whether the data matches the expectations or not (for Anything is always true).
Methods inherited from Refined
===, and_then, call, inherited, #initialize, #invalid?, match, or_a, #unpack
Constructor Details
This class inherits a constructor from BloodContracts::Core::Refined
Instance Method Details
#match ⇒ BC::Refined
The type which is the result of data matching process (for Anything is always self)
9 10 11 |
# File 'lib/blood_contracts/core/anything.rb', line 9 def match self end |
#valid? ⇒ Boolean
Checks whether the data matches the expectations or not (for Anything is always true)
18 19 20 |
# File 'lib/blood_contracts/core/anything.rb', line 18 def valid? true end |