Class: PetfinderV2::Serializers::Pagination

Inherits:
Object
  • Object
show all
Defined in:
lib/petfinder_V2/serializers/pagination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Pagination

Returns a new instance of Pagination.



10
11
12
13
14
15
16
# File 'lib/petfinder_V2/serializers/pagination.rb', line 10

def initialize(data)
  @count_per_page = data['count_per_page']
  @total_count = data['total_count']
  @current_page = data['current_page']
  @total_pages = data['total_pages']
  @links = data['_links']
end

Instance Attribute Details

#count_per_pageObject (readonly)

Returns the value of attribute count_per_page.



4
5
6
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4

def count_per_page
  @count_per_page
end

#current_pageObject (readonly)

Returns the value of attribute current_page.



4
5
6
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4

def current_page
  @current_page
end

Returns the value of attribute links.



4
5
6
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4

def links
  @links
end

#total_countObject (readonly)

Returns the value of attribute total_count.



4
5
6
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4

def total_count
  @total_count
end

#total_pagesObject (readonly)

Returns the value of attribute total_pages.



4
5
6
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4

def total_pages
  @total_pages
end