Class: Narabikae::ActiveRecordHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/narabikae/active_record_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(record, column) ⇒ ActiveRecordHandler

Initializes a new instance of the ActiveRecordHandler class.

Parameters:

  • record (Object)

    The ActiveRecord object.

  • column (Symbol)

    The column symbol.



7
8
9
10
# File 'lib/narabikae/active_record_handler.rb', line 7

def initialize(record, column)
  @record  = record
  @column  = column
end

Instance Method Details

#create_last_positionString

Generates a new key for the last position

Returns:

  • (String)

    The newly generated key for the last position.



15
16
17
# File 'lib/narabikae/active_record_handler.rb', line 15

def create_last_position
  FractionalIndexer.generate_key(prev_key: current_last_position)
end