Class: AteTracks::Structures::Pagination

Inherits:
Object
  • Object
show all
Defined in:
lib/atetracks/structures.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pageObject

Returns the value of attribute current_page.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def current_page
  @current_page
end

#next_pageObject

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_pathObject

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_byObject

Returns the value of attribute offset_by.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def offset_by
  @offset_by
end

#per_pageObject

Returns the value of attribute per_page.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def per_page
  @per_page
end

#previous_pageObject

Returns the value of attribute previous_page.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def previous_page
  @previous_page
end

#total_entriesObject

Returns the value of attribute total_entries.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def total_entries
  @total_entries
end

#total_pagesObject

Returns the value of attribute total_pages.



229
230
231
# File 'lib/atetracks/structures.rb', line 229

def total_pages
  @total_pages
end