Class: HaveAPI::Validators::Custom
- Inherits:
-
HaveAPI::Validator
- Object
- HaveAPI::Validator
- HaveAPI::Validators::Custom
- Defined in:
- lib/haveapi/validators/custom.rb
Overview
Custom validator. It has only a short form, taking the description of the validator. This validator passes every value. It is up to the developer to implement the validation in HaveAPI::Action.exec.
Instance Attribute Summary
Attributes inherited from HaveAPI::Validator
Instance Method Summary collapse
Methods inherited from HaveAPI::Validator
#initialize, name, #reconfigure, takes, use, use?, #useful?, #validate
Constructor Details
This class inherits a constructor from HaveAPI::Validator
Instance Method Details
#describe ⇒ Object
13 14 15 |
# File 'lib/haveapi/validators/custom.rb', line 13 def describe @desc end |
#setup ⇒ Object
9 10 11 |
# File 'lib/haveapi/validators/custom.rb', line 9 def setup @desc = take end |
#valid?(v) ⇒ Boolean
17 18 19 |
# File 'lib/haveapi/validators/custom.rb', line 17 def valid?(v) true end |