Class: Brauchbar::Response

Inherits:
String
  • Object
show all
Defined in:
lib/brauchbar/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



4
5
6
7
8
9
10
11
# File 'lib/brauchbar/response.rb', line 4

def initialize(response)
  @raw_status = response.status
  @raw_body = response.body
  @raw_headers = response.headers

  # no need to overwrite to_s :)
  super(body)
end

Instance Attribute Details

#raw_bodyObject (readonly) Also known as: body

Returns the value of attribute raw_body.



2
3
4
# File 'lib/brauchbar/response.rb', line 2

def raw_body
  @raw_body
end

#raw_headersObject (readonly) Also known as: headers

Returns the value of attribute raw_headers.



2
3
4
# File 'lib/brauchbar/response.rb', line 2

def raw_headers
  @raw_headers
end

#raw_statusObject (readonly) Also known as: status

Returns the value of attribute raw_status.



2
3
4
# File 'lib/brauchbar/response.rb', line 2

def raw_status
  @raw_status
end