Sha256: a4e4402303272f5b8a372728c8cc63ceca5e9f1be29f89e823d1bcfa05da0352

Contents?: true

Size: 550 Bytes

Versions: 11

Compression:

Stored size: 550 Bytes

Contents

module Praxis
  module RequestStages

    class Validate < RequestStage

      def initialize(name, context,**opts)
        super
        # Add our sub-stages
        @stages = [
          RequestStages::ValidateParamsAndHeaders.new(:params_and_headers, context, parent: self),
          RequestStages::ValidatePayload.new(:payload, context, parent: self) 
        ]
      end

      def execute
        super
      rescue Attributor::AttributorException => e
        return Responses::ValidationError.new(exception: e)
      end

    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
praxis-0.16.1 lib/praxis/request_stages/validate.rb
praxis-0.16.0 lib/praxis/request_stages/validate.rb
praxis-0.15.0 lib/praxis/request_stages/validate.rb
praxis-0.14.0 lib/praxis/request_stages/validate.rb
praxis-0.13.0 lib/praxis/request_stages/validate.rb
praxis-0.11.2 lib/praxis/request_stages/validate.rb
praxis-0.11.1 lib/praxis/request_stages/validate.rb
praxis-0.11 lib/praxis/request_stages/validate.rb
praxis-0.11pre lib/praxis/request_stages/validate.rb
praxis-0.10.1 lib/praxis/request_stages/validate.rb
praxis-0.10.0 lib/praxis/request_stages/validate.rb