Sha256: 2e0d9480f0b0710db8f63337d3ae5c6b92af78eccbc13c26eb98232b6672a4bf
Contents?: true
Size: 597 Bytes
Versions: 26
Compression:
Stored size: 597 Bytes
Contents
module Graphiti class RequestValidator delegate :validate, :validate!, :errors, :deserialized_payload, to: :@validator def initialize(root_resource, raw_params, action) @validator = ValidatorFactory.create(root_resource, raw_params, action) end class ValidatorFactory def self.create(root_resource, raw_params, action) case action when :update then RequestValidators::UpdateValidator else RequestValidators::Validator end.new(root_resource, raw_params, action) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems