class Rasti::Web::Endpoint

Public Class Methods

new(&block) click to toggle source
# File lib/rasti/web/endpoint.rb, line 5
def initialize(&block)
  @block = block
end

Public Instance Methods

call(env) click to toggle source
# File lib/rasti/web/endpoint.rb, line 9
def call(env)
  request = Request.new env
  response = Rack::Response.new
  @block.call request, response, Render.new(request, response)
  response.finish
end