Class: Shaf::Router::NullController
- Inherits:
-
Object
- Object
- Shaf::Router::NullController
- Defined in:
- lib/shaf/router.rb
Instance Method Summary collapse
-
#body(body) ⇒ Object
Called from responder.
- #call(env) ⇒ Object
-
#content_type(mime) ⇒ Object
Called from responder.
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 |