File: response.rb

package info (click to toggle)
librestclient-ruby 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 276 kB
  • ctags: 133
  • sloc: ruby: 1,994; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module RestClient

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

    include AbstractResponse

    attr_accessor :args, :body, :net_http_res

    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