Sha256: 92ae7fa853aea72391011265437b63b72863bb49ac7301e0033b000565f6f09b

Contents?: true

Size: 322 Bytes

Versions: 2

Compression:

Stored size: 322 Bytes

Contents

module Rasti
  module Web
    class Endpoint

      def initialize(&block)
        @block = block
      end

      def call(env)
        request = Request.new env
        response = Rack::Response.new
        @block.call request, response, Render.new(request, response)
        response.finish
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rasti-web-2.1.1 lib/rasti/web/endpoint.rb
rasti-web-2.1.0 lib/rasti/web/endpoint.rb