Class: AteTracks::Structures::Pagination
- Inherits:
-
Object
- Object
- AteTracks::Structures::Pagination
- Defined in:
- lib/atetracks/structures.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#next_page ⇒ Object
Returns the value of attribute next_page.
-
#next_page_path ⇒ Object
Returns the value of attribute next_page_path.
-
#offset_by ⇒ Object
Returns the value of attribute offset_by.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#previous_page ⇒ Object
Returns the value of attribute previous_page.
-
#total_entries ⇒ Object
Returns the value of attribute total_entries.
-
#total_pages ⇒ Object
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
232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/atetracks/structures.rb', line 232 def initialize(data) return nil if data.nil? @current_page = data['current_page'] @per_page = data['per_page'] @offset_by = data['offset_by'] @next_page = data['next_page'] @previous_page = data['previous_page'] @total_entries = data['total_entries'] @total_pages = data['total_pages'] @next_page_path = data['next_page_path'] end |
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def current_page @current_page end |
#next_page ⇒ Object
Returns the value of attribute next_page.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def next_page @next_page end |
#next_page_path ⇒ Object
Returns the value of attribute next_page_path.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def next_page_path @next_page_path end |
#offset_by ⇒ Object
Returns the value of attribute offset_by.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def offset_by @offset_by end |
#per_page ⇒ Object
Returns the value of attribute per_page.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def per_page @per_page end |
#previous_page ⇒ Object
Returns the value of attribute previous_page.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def previous_page @previous_page end |
#total_entries ⇒ Object
Returns the value of attribute total_entries.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def total_entries @total_entries end |
#total_pages ⇒ Object
Returns the value of attribute total_pages.
229 230 231 |
# File 'lib/atetracks/structures.rb', line 229 def total_pages @total_pages end |