Module: Instagram::Response

Defined in:
lib/instagram/response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#metaObject (readonly)

Returns the value of attribute meta


15
16
17
# File 'lib/instagram/response.rb', line 15

def meta
  @meta
end

#paginationObject (readonly)

Returns the value of attribute pagination


14
15
16
# File 'lib/instagram/response.rb', line 14

def pagination
  @pagination
end

#ratelimitObject (readonly)

Returns the value of attribute ratelimit


16
17
18
# File 'lib/instagram/response.rb', line 16

def ratelimit
  @ratelimit
end

Class Method Details

.create(response_hash, ratelimit_hash) ⇒ Object


3
4
5
6
7
8
9
10
11
12
# 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
    @pagination = response_hash.pagination
    @meta = response_hash.meta
    @ratelimit = ::Hashie::Mash.new(ratelimit_hash)
  end
  data
end