Sha256: a18e7ad8045b5444cfbd83b8b2d1be946f1ba83e41c9bb3b5cb681016b1e6078

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

module Rack::App::Runner
  extend self

  def response_for(api_class, request_env)
    endpoint = fetch_endpoint(api_class,request_env['REQUEST_METHOD'],request_env['REQUEST_PATH'])
    endpoint.execute(request_env)
  end

  protected

  def fetch_endpoint(api_class, request_method, request_path)
    api_class.router.fetch_endpoint(request_method, request_path)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-app-0.4.0 lib/rack/app/runner.rb
rack-app-0.3.0 lib/rack/app/runner.rb