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
15 16 17 |
# File 'lib/haveapi/validators/custom.rb', line 15 def describe @desc end |
#setup ⇒ Object
11 12 13 |
# File 'lib/haveapi/validators/custom.rb', line 11 def setup @desc = take end |
#valid?(v) ⇒ Boolean
19 20 21 |
# File 'lib/haveapi/validators/custom.rb', line 19 def valid?(v) true end |