Class: Geoloqi::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, headers, body) ⇒ Response

Instantiate a response object.

Examples:

Geoloqi::Response.new 200, {'Server' => 'geoloqi-platform'}, '{"response":"ok"}'


21
22
23
24
25
# File 'lib/geoloqi/response.rb', line 21

def initialize(status, headers, body)
  @status = status
  @headers = headers
  @body = body
end

Instance Attribute Details

#bodyString (readonly)

The body of the response



13
14
15
# File 'lib/geoloqi/response.rb', line 13

def body
  @body
end

#headersHash (readonly)

The HTTP Headers of the response



9
10
11
# File 'lib/geoloqi/response.rb', line 9

def headers
  @headers
end

#statusFixnum (readonly)

The HTTP status code of the response



5
6
7
# File 'lib/geoloqi/response.rb', line 5

def status
  @status
end