Module: Instagram::Response
- Defined in:
- lib/instagram/response.rb
Instance Attribute Summary collapse
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#pagination ⇒ Object
readonly
Returns the value of attribute pagination.
-
#ratelimit ⇒ Object
readonly
Returns the value of attribute ratelimit.
Class Method Summary collapse
Instance Attribute Details
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
18 19 20 |
# File 'lib/instagram/response.rb', line 18 def @meta end |
#pagination ⇒ Object (readonly)
Returns the value of attribute pagination.
17 18 19 |
# File 'lib/instagram/response.rb', line 17 def pagination @pagination end |
#ratelimit ⇒ Object (readonly)
Returns the value of attribute ratelimit.
19 20 21 |
# File 'lib/instagram/response.rb', line 19 def ratelimit @ratelimit end |
Class Method Details
.create(response_hash, ratelimit_hash) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/instagram/response.rb', line 3 def self.create( response_hash, ratelimit_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 |