Class: WAB::Racker

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#shellObject

: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