Sha256: 43e6361e887c61fa9e67fdd841b981352932457877eb5161ef036d8aebcbadff

Contents?: true

Size: 374 Bytes

Versions: 4

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

4 entries across 4 versions & 1 rubygems

Version Path
rack-app-0.2.3 lib/rack/app/runner.rb
rack-app-0.2.2 lib/rack/app/runner.rb
rack-app-0.2.1 lib/rack/app/runner.rb
rack-app-0.2.0 lib/rack/app/runner.rb