Class: LegacyMigrations::Squirrel::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/legacy_migrations/squirrel/paginator.rb

Overview

The Page class holds information about the current page of results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(offset, limit, page, per_page) ⇒ Page

Returns a new instance of Page.



55
56
57
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 55

def initialize(offset, limit, page, per_page)
  @offset, @limit, @page, @per_page = offset, limit, page, per_page
end

Instance Attribute Details

#limitObject (readonly)

Returns the value of attribute limit.



54
55
56
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54

def limit
  @limit
end

#offsetObject (readonly)

Returns the value of attribute offset.



54
55
56
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54

def offset
  @offset
end

#pageObject (readonly)

Returns the value of attribute page.



54
55
56
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54

def page
  @page
end

#per_pageObject (readonly)

Returns the value of attribute per_page.



54
55
56
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54

def per_page
  @per_page
end