Class: Ree::Contracts::BaseValidator
- Includes:
- Truncatable
- Defined in:
- lib/ree/contracts/validators/base_validator.rb
Direct Known Subclasses
ArrayValidator, ClassValidator, DefaultValidator, HashValidator, ProcValidator, RangeValidator, RegexpValidator, ValidValidator
Instance Attribute Summary collapse
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
Instance Method Summary collapse
- #call(value) ⇒ Object
-
#initialize(contract) ⇒ BaseValidator
constructor
A new instance of BaseValidator.
- #to_s ⇒ Object
Methods included from Truncatable
Constructor Details
#initialize(contract) ⇒ BaseValidator
Returns a new instance of BaseValidator.
9 10 11 |
# File 'lib/ree/contracts/validators/base_validator.rb', line 9 def initialize(contract) @contract = contract end |
Instance Attribute Details
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
7 8 9 |
# File 'lib/ree/contracts/validators/base_validator.rb', line 7 def contract @contract end |