Sha256: 457e662d081ba39794bf0eb93e0cd57c62cb51216798c94dfd71c761010af431
Contents?: true
Size: 695 Bytes
Versions: 3
Compression:
Stored size: 695 Bytes
Contents
module Instagram module Response def self.create(response_hash, ratelimit_hash) response_hash = {} unless response_hash data = begin raise if response_hash.data.nil? response_hash.data.dup rescue response_hash end 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
instagram-continued-1.4.0 | lib/instagram/response.rb |
instagram-continued-1.3.3 | lib/instagram/response.rb |
instagram-continued-1.3.2 | lib/instagram/response.rb |