Class: Dennis::Pagination
- Inherits:
-
Object
- Object
- Dennis::Pagination
- Defined in:
- lib/dennis/pagination.rb
Instance Method Summary collapse
- #current_page ⇒ Object
-
#initialize(hash) ⇒ Pagination
constructor
A new instance of Pagination.
- #large_set? ⇒ Boolean
- #per_page ⇒ Object
- #total ⇒ Object
- #total_pages ⇒ Object
Constructor Details
#initialize(hash) ⇒ Pagination
Returns a new instance of Pagination.
6 7 8 |
# File 'lib/dennis/pagination.rb', line 6 def initialize(hash) @hash = hash end |
Instance Method Details
#current_page ⇒ Object
10 11 12 |
# File 'lib/dennis/pagination.rb', line 10 def current_page @hash['current_page'] end |
#large_set? ⇒ Boolean
26 27 28 |
# File 'lib/dennis/pagination.rb', line 26 def large_set? @hash['large_set'] end |
#per_page ⇒ Object
22 23 24 |
# File 'lib/dennis/pagination.rb', line 22 def per_page @hash['per_page'] end |
#total ⇒ Object
18 19 20 |
# File 'lib/dennis/pagination.rb', line 18 def total @hash['total'] end |
#total_pages ⇒ Object
14 15 16 |
# File 'lib/dennis/pagination.rb', line 14 def total_pages @hash['total_pages'] end |