Class: Kentico::Kontent::Delivery::Pagination

Inherits:
Object
  • Object
show all
Defined in:
lib/delivery/models/pagination.rb

Overview

Holds pagination data from listing responses

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Pagination

Constructor.

  • Args:

    • json (JSON) The ‘pagination’ node of a listing reponse’s JSON object



12
13
14
15
16
17
# File 'lib/delivery/models/pagination.rb', line 12

def initialize(json)
  self.skip = json['skip']
  self.limit = json['limit']
  self.count = json['count']
  self.next_page = json['next_page']
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



6
7
8
# File 'lib/delivery/models/pagination.rb', line 6

def count
  @count
end

#limitObject

Returns the value of attribute limit.



6
7
8
# File 'lib/delivery/models/pagination.rb', line 6

def limit
  @limit
end

#next_pageObject

Returns the value of attribute next_page.



6
7
8
# File 'lib/delivery/models/pagination.rb', line 6

def next_page
  @next_page
end

#skipObject

Returns the value of attribute skip.



6
7
8
# File 'lib/delivery/models/pagination.rb', line 6

def skip
  @skip
end