Sha256: 51297c4d658d22f1eb8cb32b0da96cbfb8af64109cf60f00a6c0a06958dc7c88
Contents?: true
Size: 683 Bytes
Versions: 12
Compression:
Stored size: 683 Bytes
Contents
module SocialProfile class Response attr_reader :uri, :response, :body, :headers def initialize(uri, response, options={}) @uri = uri @response = response @body = response.body || options[:body] @headers = response.to_hash end def code response.code.to_i end def respond_to?(name) return true if [:uri, :response, :body, :headers].include?(name) response.respond_to?(name) end protected def method_missing(name, *args, &block) if response.respond_to?(name) response.send(name, *args, &block) else super end end end end
Version data entries
12 entries across 12 versions & 1 rubygems