Class: LegacyMigrations::Squirrel::Page
- Inherits:
-
Object
- Object
- LegacyMigrations::Squirrel::Page
- Defined in:
- lib/legacy_migrations/squirrel/paginator.rb
Overview
The Page class holds information about the current page of results.
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#per_page ⇒ Object
readonly
Returns the value of attribute per_page.
Instance Method Summary collapse
-
#initialize(offset, limit, page, per_page) ⇒ Page
constructor
A new instance of Page.
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
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
54 55 56 |
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
54 55 56 |
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54 def offset @offset end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
54 55 56 |
# File 'lib/legacy_migrations/squirrel/paginator.rb', line 54 def page @page end |
#per_page ⇒ Object (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 |