Sha256: ca5ed266212ce5bb7dc04ff8962e2a90c3505e8409b7f9250dabe6f8d27dcea8

Contents?: true

Size: 988 Bytes

Versions: 4

Compression:

Stored size: 988 Bytes

Contents

module Deas

  class RequestData

    # The rack app uses this to "compile" the request-related data. The goal
    # here is to wrap up these (and any future) request objects into a struct
    # object to make them available to the runner/handler.  This is also to
    # decouple the rack app from the handlers (we can use any rack app as long
    # as they provide this data).

    attr_reader :request, :response, :params, :route_path

    def initialize(args)
      @request    = args[:request]
      @response   = args[:response]
      @params     = args[:params]
      @route_path = args[:route_path]
    end

    def ==(other_request_data)
      if other_request_data.kind_of?(RequestData)
        self.request    == other_request_data.request    &&
        self.response   == other_request_data.response   &&
        self.params     == other_request_data.params     &&
        self.route_path == other_request_data.route_path
      else
        super
      end
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deas-0.43.3 lib/deas/request_data.rb
deas-0.43.2 lib/deas/request_data.rb
deas-0.43.1 lib/deas/request_data.rb
deas-0.43.0 lib/deas/request_data.rb