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:

  • str (String)

    The serialized cursor string.

Returns:

  • (Hash)

    a hash representation of the cursor.

Raises:

  • (NotImplementedError)


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:

  • hash (Hash)

    The hash representation of the cursor.

Returns:

  • (String)

    the serialized cursor string.

Raises:

  • (NotImplementedError)


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

def serialize(hash)
  raise NotImplementedError
end