Exception: CursorPager::CursorNotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/cursor_pager/cursor_not_found_error.rb

Overview

Will be raised when the cursor’s record couldn’t be found in the relation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ CursorNotFoundError

Returns a new instance of CursorNotFoundError.



9
10
11
12
13
14
# File 'lib/cursor_pager/cursor_not_found_error.rb', line 9

def initialize(cursor)
  @cursor = cursor
  message = "Couldn't find item for cursor: #{cursor}."

  super(message)
end

Instance Attribute Details

#cursorObject (readonly)

Returns the value of attribute cursor.



7
8
9
# File 'lib/cursor_pager/cursor_not_found_error.rb', line 7

def cursor
  @cursor
end