Class: WAB::Racker
- Inherits:
-
Object
- Object
- WAB::Racker
- Defined in:
- lib/wab/racker.rb
Overview
A Racker or a duck-typed alternative should be created and registered with a Shell for paths that expected to follow the Ruby rack API. The shell is included so that queries can be made when responding to requests.
Instance Attribute Summary collapse
-
#shell ⇒ Object
:doc: all.
Instance Method Summary collapse
-
#call(env) ⇒ Object
Rack handler for processing rack requests.
-
#initialize(shell) ⇒ Racker
constructor
Create a instance.
Constructor Details
#initialize(shell) ⇒ Racker
Create a instance.
10 11 12 |
# File 'lib/wab/racker.rb', line 10 def initialize(shell) @shell = shell end |
Instance Attribute Details
#shell ⇒ Object
:doc: all
7 8 9 |
# File 'lib/wab/racker.rb', line 7 def shell @shell end |
Instance Method Details
#call(env) ⇒ Object
Rack handler for processing rack requests. Implemenation should follow the rack API described at rack.github.io.
- env
-
data to be processed
- return
-
a rack compliant response.
20 21 22 |
# File 'lib/wab/racker.rb', line 20 def call(env) [200, {}, ['A WABuR Rack Application']] end |