File: response.rb

package info (click to toggle)
ruby-rest-client 1.6.7-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 336 kB
  • ctags: 198
  • sloc: ruby: 2,242; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module RestClient

  # A Response from RestClient, you can access the response body, the code or the headers.
  #
  module Response

    include AbstractResponse

    def body
      self
    end

    def self.create body, net_http_res, args, request
      result = body || ''
      result.extend Response
      result.response_set_vars(net_http_res, args, request)
      result
    end

  end
end