Class: Graphiti::RequestValidator::ValidatorFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/graphiti/request_validator.rb

Class Method Summary collapse

Class Method Details

.create(root_resource, raw_params, action) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/graphiti/request_validator.rb', line 14

def self.create(root_resource, raw_params, action)
  case action
  when :update
    RequestValidators::UpdateValidator
  else
    RequestValidators::Validator
  end.new(root_resource, raw_params, action)
end