Class: Navigable::Server::Router

Inherits:
Object
  • Object
show all
Defined in:
lib/navigable/server/router.rb

Instance Method Summary collapse

Instance Method Details

#add_endpoint(verb:, path:, endpoint_class:) ⇒ Object



10
11
12
13
# File 'lib/navigable/server/router.rb', line 10

def add_endpoint(verb:, path:, endpoint_class:)
  request_adapter = RackAdapter.new(endpoint_class: endpoint_class)
  router.public_send(verb, path, to: request_adapter)
end

#call(env) ⇒ Object



6
7
8
# File 'lib/navigable/server/router.rb', line 6

def call(env)
  router.call(env)
end