Class: Serve::RackAdapter
- Inherits:
-
Object
- Object
- Serve::RackAdapter
- Defined in:
- lib/serve/rack.rb
Instance Method Summary (collapse)
-
- (Object) call(env)
Called by Rack to process a request.
-
- (RackAdapter) initialize(root)
constructor
Initialize a Rack endpoint for Serve with the root path to the views directory.
Constructor Details
- (RackAdapter) initialize(root)
Initialize a Rack endpoint for Serve with the root path to the views directory.
80 81 82 |
# File 'lib/serve/rack.rb', line 80 def initialize(root) @root = root end |
Instance Method Details
- (Object) call(env)
Called by Rack to process a request.
85 86 87 88 89 |
# File 'lib/serve/rack.rb', line 85 def call(env) request = Request.new(env) response = Response.new() process(request, response).to_a end |