Class: Grape::Validations::SingleOptionValidator

Inherits:
Validator
  • Object
show all
Defined in:
lib/grape/validations.rb

Overview

Base class for all validators taking only one param.

Direct Known Subclasses

CoerceValidator, RegexpValidator

Instance Attribute Summary

Attributes inherited from Validator

#attrs

Instance Method Summary collapse

Methods inherited from Validator

inherited, #validate!

Constructor Details

#initialize(attrs, options, required, scope) ⇒ SingleOptionValidator

Returns a new instance of SingleOptionValidator.


63
64
65
66
# File 'lib/grape/validations.rb', line 63

def initialize(attrs, options, required, scope)
  @option = options
  super
end