class SocialProfile::Response
Attributes
body[R]
headers[R]
response[R]
uri[R]
Public Class Methods
new(uri, response, options={})
click to toggle source
# File lib/social_profile/response.rb, line 5 def initialize(uri, response, options={}) @uri = uri @response = response @body = response.body || options[:body] @headers = response.to_hash end
Public Instance Methods
code()
click to toggle source
# File lib/social_profile/response.rb, line 12 def code response.code.to_i end
respond_to?(name)
click to toggle source
# File lib/social_profile/response.rb, line 16 def respond_to?(name) return true if [:uri, :response, :body, :headers].include?(name) response.respond_to?(name) end
Protected Instance Methods
method_missing(name, *args, &block)
click to toggle source
Calls superclass method
# File lib/social_profile/response.rb, line 23 def method_missing(name, *args, &block) if response.respond_to?(name) response.send(name, *args, &block) else super end end