Class: Restapi::Validator::UndefValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- Restapi::Validator::UndefValidator
- Defined in:
- lib/restapi/validator.rb
Overview
special type of validator: we say that it’s not specified
Instance Attribute Summary
Attributes inherited from BaseValidator
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseValidator
#expected_type, find, inherited, #initialize, #param_name, #to_json, #to_s, #valid?
Constructor Details
This class inherits a constructor from Restapi::Validator::BaseValidator
Class Method Details
.build(param_description, argument, options, block) ⇒ Object
233 234 235 236 237 |
# File 'lib/restapi/validator.rb', line 233 def self.build(param_description, argument, , block) if argument == :undef self.new(param_description) end end |
Instance Method Details
#description ⇒ Object
239 240 241 |
# File 'lib/restapi/validator.rb', line 239 def description nil end |
#validate(value) ⇒ Object
229 230 231 |
# File 'lib/restapi/validator.rb', line 229 def validate(value) true end |