Class: ActiverecordCursorPagination::Serializer

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

Direct Known Subclasses

SecureCursorSerializer

Instance Method Summary collapse

Instance Method Details

#deserialize(str) ⇒ Hash

This method is abstract.

Deserialize the cursor.

Parameters:

  • The serialized cursor string.

Returns:

  • a hash representation of the cursor.

Raises:



11
12
13
# File 'lib/activerecord_cursor_pagination/serializer.rb', line 11

def deserialize(str)
  raise NotImplementedError
end

#serialize(hash) ⇒ String

This method is abstract.

Serialize the hash representation of the cursor.

Parameters:

  • The hash representation of the cursor.

Returns:

  • the serialized cursor string.

Raises:



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

def serialize(hash)
  raise NotImplementedError
end