Class: Net::HTTPResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/ephemeral_response/net_http.rb

Instance Method Summary collapse

Instance Method Details

#procdest(dest, block) ⇒ Object



56
57
58
59
# File 'lib/ephemeral_response/net_http.rb', line 56

def procdest(dest, block)
  to = procdest_without_ephemeral_response(dest, block)
  to.extend PersistentReadAdapter
end

#procdest_without_ephemeral_responseObject



53
# File 'lib/ephemeral_response/net_http.rb', line 53

alias procdest_without_ephemeral_response procdest

#read_body(dest = nil, &block) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/ephemeral_response/net_http.rb', line 61

def read_body(dest = nil, &block)
  if @read
    yield @body if block_given?
    @body
  else
    read_body_without_ephemeral_response(dest, &block)
  end
end

#read_body_without_ephemeral_responseObject



54
# File 'lib/ephemeral_response/net_http.rb', line 54

alias read_body_without_ephemeral_response read_body