Class: ActiverecordCursorPagination::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
# File 'lib/activerecord_cursor_pagination/configuration.rb', line 5

def initialize
  setup_defaults
end

Instance Attribute Details

#secret_keyString

Gets the secret key base for secure cursor implementations.

If Rails is defined, secret_key will try to find the implementation of the default secret_key_base in the application.

Returns:

  • (String)

    The secret key.

Raises:



18
19
20
# File 'lib/activerecord_cursor_pagination/configuration.rb', line 18

def secret_key
  @secret_key
end

#serializerObject

Returns the value of attribute serializer.



3
4
5
# File 'lib/activerecord_cursor_pagination/configuration.rb', line 3

def serializer
  @serializer
end

Instance Method Details

#serializer_instanceSerializer

Get an instance of the serializer

Returns:



27
28
29
# File 'lib/activerecord_cursor_pagination/configuration.rb', line 27

def serializer_instance
  serializer.new
end