class Rack::LDP::Requests
Public Class Methods
new(app)
click to toggle source
@param [#call] app
# File lib/rack/ldp.rb, line 90 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
Handles a Rack
protocol request. Sends appropriate request to the object, alters response accordingly.
@param [Array] env a rack env array @return [Array] a rack env array with added headers
# File lib/rack/ldp.rb, line 100 def call(env) status, headers, response = @app.call(env) return [status, headers, response] unless response.is_a? RDF::LDP::Resource response .send(:request, env['REQUEST_METHOD'].to_sym, status, headers, env) end