Class: ActiverecordCursorPagination::EmptyCursor

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord_cursor_pagination/empty_cursor.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_paramObject



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

Returns:

  • (Boolean)


15
16
17
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 15

def empty?
  true
end

#present?Boolean

Is the cursor not empty

Returns:

  • (Boolean)


7
8
9
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 7

def present?
  false
end

#to_sString Also known as: to_param

Get the string representation of the cursor

Returns:

  • (String)

    The serialized cursor



23
24
25
# File 'lib/activerecord_cursor_pagination/empty_cursor.rb', line 23

def to_s
  ''
end