class Facile::Response
Attributes
body[RW]
headers[RW]
raw_body[RW]
request[RW]
response[RW]
status[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/facile/response.rb, line 4 def initialize(options) options.each do |k,v| self.send("#{k}=", v) end wrap_body(raw_body) end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/facile/response.rb, line 16 def method_missing(method, *args, &block) if body.respond_to?(method) body.send(method, args.first) end end
wrap_body(body)
click to toggle source
# File lib/facile/response.rb, line 12 def wrap_body(body) @body = ::Facile::Response::Wrapper.parse(body, headers) end