Class: Hyde::Handlers::GET
- Defined in:
- lib/hyde/probe/http_method.rb
Overview
Probe that executes callback on a GET
Constant Summary collapse
- METHOD =
"GET"
Instance Attribute Summary
Attributes inherited from Handler
Attributes inherited from Probe
Attributes inherited from Node
Instance Method Summary collapse
-
#process(request) ⇒ Boolean
Method callback on successful request navigation.
Methods inherited from Handler
Methods inherited from Probe
Methods inherited from Node
Constructor Details
This class inherits a constructor from Hyde::Handlers::Handler
Instance Method Details
#process(request) ⇒ Boolean
Method callback on successful request navigation. Runs block supplied with object initialization. Request's #splat and #param are passed to block.
Callback's returned should be one of viable responses:
- Response object
- An array that matches Rack return form
- An array that matches old (Rack 2.x) return form
- A string (returned as HTML with code 200)
- false (bounces the request to next handler)
25 26 27 28 29 30 31 |
# File 'lib/hyde/probe/http_method.rb', line 25 def process(request) unless request.request_method.casecmp(self.class::METHOD).zero? return false end super(request) end |