Class: ActiverecordCursorPagination::EmptyCursor
- Inherits:
-
Object
- Object
- ActiverecordCursorPagination::EmptyCursor
- Defined in:
- lib/activerecord_cursor_pagination/empty_cursor.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Is the cursor empty.
-
#present? ⇒ Boolean
Is the cursor not empty.
-
#to_s ⇒ String
(also: #to_param)
Get the string representation of the cursor.
Class Method Details
.to_param ⇒ Object
30 31 32 |
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 30 def to_param EmptyCursor.new.to_param end |
Instance Method Details
#empty? ⇒ Boolean
Is the cursor empty
15 16 17 |
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 15 def empty? true end |
#present? ⇒ Boolean
Is the cursor not empty
7 8 9 |
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 7 def present? false end |
#to_s ⇒ String Also known as: to_param
Get the string representation of the cursor
23 24 25 |
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 23 def to_s '' end |