Class: Praxis::RequestStages::Validate
- Inherits:
-
RequestStage
- Object
- Stage
- RequestStage
- Praxis::RequestStages::Validate
- Defined in:
- lib/praxis/request_stages/validate.rb
Instance Attribute Summary
Attributes inherited from Stage
#after_callbacks, #before_callbacks, #context, #name, #stages
Instance Method Summary collapse
-
#initialize(name, context, **opts) ⇒ Validate
constructor
A new instance of Validate.
Methods inherited from RequestStage
#action, #controller, #execute, #execute_controller_callbacks, #execute_with_around, #path, #request, #run, #setup!, #validation_handler
Methods inherited from Stage
#after, #application, #before, #callback_args, #execute, #execute_callbacks, #run, #setup!, #setup_deferred_callbacks!
Constructor Details
#initialize(name, context, **opts) ⇒ Validate
Returns a new instance of Validate.
6 7 8 9 10 11 12 13 |
# File 'lib/praxis/request_stages/validate.rb', line 6 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 |