Class: Committee::ParamValidator

Inherits:
Object
  • Object
show all
Includes:
Validation
Defined in:
lib/committee/param_validator.rb

Instance Method Summary collapse

Methods included from Validation

#check_format, #check_format!, #check_pattern, #check_pattern!, #check_type, #check_type!

Constructor Details

#initialize(params, schema, link_schema) ⇒ ParamValidator

Returns a new instance of ParamValidator.



5
6
7
8
9
# File 'lib/committee/param_validator.rb', line 5

def initialize(params, schema, link_schema)
  @params = params
  @schema = schema
  @link_schema = link_schema
end

Instance Method Details

#callObject



11
12
13
14
15
# File 'lib/committee/param_validator.rb', line 11

def call
  detect_missing!
  detect_extra!
  check_data!
end