Class: ActiveEndpoint::Response

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

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



3
4
5
# File 'lib/active_endpoint/response.rb', line 3

def initialize(response)
  @response = response
end

Instance Method Details

#bodyObject



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

def body
  @response.join if @response.respond_to? :join
end

#probeObject



7
8
9
10
11
# File 'lib/active_endpoint/response.rb', line 7

def probe
  {
    body: body
  }
end