Module: MotionGiphy::Pagination

Defined in:
lib/motion-giphy/pagination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



3
4
5
# File 'lib/motion-giphy/pagination.rb', line 3

def count
  @count
end

#offsetObject (readonly)

Returns the value of attribute offset.



3
4
5
# File 'lib/motion-giphy/pagination.rb', line 3

def offset
  @offset
end

#totalObject (readonly)

Returns the value of attribute total.



3
4
5
# File 'lib/motion-giphy/pagination.rb', line 3

def total
  @total
end

Instance Method Details

#initialize(pagination) ⇒ Object



5
6
7
8
9
# File 'lib/motion-giphy/pagination.rb', line 5

def initialize(pagination)
  @total = pagination["total_count"]
  @count = pagination["count"]
  @offset = pagination["offset"]
end