Class: PetfinderV2::Serializers::Pagination
- Inherits:
-
Object
- Object
- PetfinderV2::Serializers::Pagination
- Defined in:
- lib/petfinder_V2/serializers/pagination.rb
Instance Attribute Summary collapse
-
#count_per_page ⇒ Object
readonly
Returns the value of attribute count_per_page.
-
#current_page ⇒ Object
readonly
Returns the value of attribute current_page.
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
-
#total_pages ⇒ Object
readonly
Returns the value of attribute total_pages.
Instance Method Summary collapse
-
#initialize(data) ⇒ Pagination
constructor
A new instance of Pagination.
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_page ⇒ Object (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_page ⇒ Object (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 |
#links ⇒ Object (readonly)
Returns the value of attribute links.
4 5 6 |
# File 'lib/petfinder_V2/serializers/pagination.rb', line 4 def links @links end |
#total_count ⇒ Object (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_pages ⇒ Object (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 |