Sha256: 4a7319205512d19d0cbe39df92f3c4729ec52576a947907358c457f340d212a7

Contents?: true

Size: 366 Bytes

Versions: 2

Compression:

Stored size: 366 Bytes

Contents

# encoding: UTF-8

module Spontaneous
  module Rack
    class AroundPreview
      def initialize(app)
        @app = app
      end

      def call(env)
        response = nil
        Content.with_identity_map do
          S::Render.with_preview_renderer do
            response = @app.call(env)
          end
        end
        response
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha2 lib/spontaneous/rack/around_preview.rb
spontaneous-0.2.0.alpha1 lib/spontaneous/rack/around_preview.rb