1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
rest-client--rest-client/lib/restclient/response.rb
Kenichi Kamiya 54abe59405 Fix to redefine reader method
This commit removes below interpreter warning.

* warning: method redefined

(cherry picked from commit c67b6a95a4)
Signed-off-by: Larry Gilbert <larry@l2g.to>
2014-01-24 19:22:10 -08:00

26 lines
461 B
Ruby

module RestClient
# A Response from RestClient, you can access the response body, the code or the headers.
#
module Response
include AbstractResponse
attr_accessor :args, :net_http_res
attr_writer :body
def body
self
end
def Response.create body, net_http_res, args
result = body || ''
result.extend Response
result.net_http_res = net_http_res
result.args = args
result
end
end
end