Class: DevSuite::RequestLogger::Request

Inherits:
Object
  • Object
show all
Includes:
Utils::WarningHandler
Defined in:
lib/dev_suite/request_logger/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils::WarningHandler

#warn_if_missing

Constructor Details

#initialize(method:, url:, headers:, cookies:, body:) ⇒ Request

Returns a new instance of Request.



12
13
14
15
16
17
18
19
20
# File 'lib/dev_suite/request_logger/request.rb', line 12

def initialize(method:, url:, headers:, cookies:, body:)
  @method = method
  @url = url
  @headers = headers
  @cookies = cookies
  @body = body

  validate_presence
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



10
11
12
# File 'lib/dev_suite/request_logger/request.rb', line 10

def body
  @body
end

#cookiesObject (readonly)

Returns the value of attribute cookies.



10
11
12
# File 'lib/dev_suite/request_logger/request.rb', line 10

def cookies
  @cookies
end

#headersObject (readonly)

Returns the value of attribute headers.



10
11
12
# File 'lib/dev_suite/request_logger/request.rb', line 10

def headers
  @headers
end

#methodObject (readonly)

Returns the value of attribute method.



10
11
12
# File 'lib/dev_suite/request_logger/request.rb', line 10

def method
  @method
end

#urlObject (readonly)

Returns the value of attribute url.



10
11
12
# File 'lib/dev_suite/request_logger/request.rb', line 10

def url
  @url
end