Sha256: fadbd2d6837c1a7b46cff4726d053da3d92305f820904415d0f0590fade4b8b4

Contents?: true

Size: 596 Bytes

Versions: 17

Compression:

Stored size: 596 Bytes

Contents

class Rack::App::Router::Static < Rack::App::Router::Base

  def fetch_endpoint(request_method, request_path)
    mapped_endpoint_routes[[request_method, request_path]]
  end

  def compile_registered_endpoints!
    mapped_endpoint_routes.clear
    endpoints.each do |endpoint|
      request_method, request_path, endpoint_object = endpoint[:request_method], endpoint[:request_path], endpoint[:endpoint]
      mapped_endpoint_routes[[request_method.to_s.upcase, request_path]]= endpoint_object
    end
  end

  protected

  def mapped_endpoint_routes
    @mapped_endpoint_routes ||= {}
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rack-app-3.0.0.alpha lib/rack/app/router/static.rb
rack-app-2.3.1 lib/rack/app/router/static.rb
rack-app-2.3.0 lib/rack/app/router/static.rb
rack-app-2.2.0 lib/rack/app/router/static.rb
rack-app-2.1.0 lib/rack/app/router/static.rb
rack-app-2.0.0 lib/rack/app/router/static.rb
rack-app-1.4.0 lib/rack/app/router/static.rb
rack-app-1.3.0 lib/rack/app/router/static.rb
rack-app-1.2.2 lib/rack/app/router/static.rb
rack-app-1.2.1 lib/rack/app/router/static.rb
rack-app-1.1.0 lib/rack/app/router/static.rb
rack-app-1.0.0 lib/rack/app/router/static.rb
rack-app-0.24.0 lib/rack/app/router/static.rb
rack-app-0.23.0 lib/rack/app/router/static.rb
rack-app-0.22.0 lib/rack/app/router/static.rb
rack-app-0.21.0 lib/rack/app/router/static.rb
rack-app-0.20.0 lib/rack/app/router/static.rb