Class: Shaf::Router::NullController

Inherits:
Object
  • Object
show all
Defined in:
lib/shaf/router.rb

Instance Method Summary collapse

Instance Method Details

#body(body) ⇒ Object

Called from responder



40
41
42
# File 'lib/shaf/router.rb', line 40

def body(body)
  response.body  = body
end

#call(env) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/shaf/router.rb', line 26

def call(env)
  request = request(env)
  responder = Responder.for(request, error)
  responder.call(self, error)

  response.finish
end

#content_type(mime) ⇒ Object

Called from responder



35
36
37
# File 'lib/shaf/router.rb', line 35

def content_type(mime)
  response["Content-Type"] = mime
end