Class: Navigable::Server::RackAdapter
- Inherits:
-
Object
- Object
- Navigable::Server::RackAdapter
- Defined in:
- lib/navigable/server/rack_adapter.rb
Instance Attribute Summary collapse
-
#endpoint_class ⇒ Object
readonly
Returns the value of attribute endpoint_class.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(endpoint_class:) ⇒ RackAdapter
constructor
A new instance of RackAdapter.
Constructor Details
#initialize(endpoint_class:) ⇒ RackAdapter
Returns a new instance of RackAdapter.
8 9 10 |
# File 'lib/navigable/server/rack_adapter.rb', line 8 def initialize(endpoint_class:) @endpoint_class = endpoint_class end |
Instance Attribute Details
#endpoint_class ⇒ Object (readonly)
Returns the value of attribute endpoint_class.
6 7 8 |
# File 'lib/navigable/server/rack_adapter.rb', line 6 def endpoint_class @endpoint_class end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 |
# File 'lib/navigable/server/rack_adapter.rb', line 12 def call(env) Response.new(endpoint(request(env)).execute).to_rack_response end |