Class: Footrest::Pagination::Links
- Inherits:
-
Struct
- Object
- Struct
- Footrest::Pagination::Links
- Defined in:
- lib/footrest/pagination.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#first ⇒ Object
Returns the value of attribute first.
-
#last ⇒ Object
Returns the value of attribute last.
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
(also: #previous)
Returns the value of attribute prev.
Instance Method Summary collapse
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current
5 6 7 |
# File 'lib/footrest/pagination.rb', line 5 def current @current end |
#first ⇒ Object
Returns the value of attribute first
5 6 7 |
# File 'lib/footrest/pagination.rb', line 5 def first @first end |
#last ⇒ Object
Returns the value of attribute last
5 6 7 |
# File 'lib/footrest/pagination.rb', line 5 def last @last end |
#next ⇒ Object
Returns the value of attribute next
5 6 7 |
# File 'lib/footrest/pagination.rb', line 5 def next @next end |
#prev ⇒ Object Also known as: previous
Returns the value of attribute prev
5 6 7 |
# File 'lib/footrest/pagination.rb', line 5 def prev @prev end |
Instance Method Details
#last_page? ⇒ Boolean
9 10 11 12 |
# File 'lib/footrest/pagination.rb', line 9 def last_page? return false unless self.current && self.last self.current == self.last end |