Class: Sinatra::ParamValidator::Rule
- Inherits:
-
Object
- Object
- Sinatra::ParamValidator::Rule
- Extended by:
- Camelize
- Defined in:
- lib/sinatra/param_validator/rule.rb,
lib/sinatra/param_validator/rule/any_of.rb,
lib/sinatra/param_validator/rule/common.rb,
lib/sinatra/param_validator/rule/one_of.rb,
lib/sinatra/param_validator/rule/all_or_none_of.rb
Overview
Class to check a single rule
Defined Under Namespace
Modules: Common Classes: AllOrNoneOf, AnyOf, OneOf
Class Method Summary collapse
Methods included from Camelize
Class Method Details
.new(name, params, *args, **kwargs) ⇒ Object
15 16 17 18 19 |
# File 'lib/sinatra/param_validator/rule.rb', line 15 def new(name, params, *args, **kwargs) name = camelize(name) if name.is_a? Symbol klass = Object.const_get "Sinatra::ParamValidator::Rule::#{name}" klass.new(params, *args, **kwargs) end |