Sha256: f964e3f9d756ce2f07801528a0c50b2b44639cd0720f44f03053b85e02fc409d
Contents?: true
Size: 585 Bytes
Versions: 10
Compression:
Stored size: 585 Bytes
Contents
module Instagram module Response def self.create( response_hash, ratelimit_hash ) response_hash = {} unless response_hash data = response_hash.data.dup rescue response_hash data.extend( self ) data.instance_exec do %w{pagination meta}.each do |k| response_hash.public_send(k).tap do |v| instance_variable_set("@#{k}", v) if v end end @ratelimit = ::Hashie::Mash.new(ratelimit_hash) end data end attr_reader :pagination attr_reader :meta attr_reader :ratelimit end end
Version data entries
10 entries across 10 versions & 2 rubygems