Sha256: 4c1b4193b4b0c3402f32f6b61788628202acfc24b95c6fa8ebc3d23495502bb8
Contents?: true
Size: 635 Bytes
Versions: 1
Compression:
Stored size: 635 Bytes
Contents
module Pakyow module Middleware class Presenter def initialize(app) @app = app end def call(env) r = Pakyow.app.request while(r) do Pakyow.app.presenter.prepare_for_request(Pakyow.app.request) r = catch(:rerouted) { @app.call(@env) nil } end #TODO the right thing to do? Pakyow.app.response.body = [Pakyow.app.presenter.content] if Pakyow.app.presenter.presented? Pakyow.app.response.finish end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pakyow-core-0.8rc1 | pakyow-core/lib/core/middleware/presenter.rb |