Class: RoadForest::HTTP::BaseResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/http/graph-response.rb

Direct Known Subclasses

GraphResponse, UnparseableResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, response) ⇒ BaseResponse

Returns a new instance of BaseResponse.



6
7
8
# File 'lib/roadforest/http/graph-response.rb', line 6

def initialize(url, response)
  @url, @response = url, response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/roadforest/http/graph-response.rb', line 4

def response
  @response
end

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/roadforest/http/graph-response.rb', line 4

def url
  @url
end

Instance Method Details

#etagObject



10
11
12
# File 'lib/roadforest/http/graph-response.rb', line 10

def etag
  response.etag
end

#raw_bodyObject



18
19
20
# File 'lib/roadforest/http/graph-response.rb', line 18

def raw_body
  response.body
end

#statusObject



14
15
16
# File 'lib/roadforest/http/graph-response.rb', line 14

def status
  response.status
end