Class: MemDB::Indexation

Inherits:
Object
  • Object
show all
Defined in:
lib/mem_db/indexation.rb

Instance Method Summary collapse

Constructor Details

#initialize(index) ⇒ Indexation

Returns a new instance of Indexation.



7
8
9
10
# File 'lib/mem_db/indexation.rb', line 7

def initialize(index)
  @obj = MemDB::IndexingObject.new
  @index = index
end

Instance Method Details

#add(raw, value) ⇒ Object



12
13
14
15
# File 'lib/mem_db/indexation.rb', line 12

def add(raw, value)
  @obj.assign!(raw)
  @index.add(@obj, value)
end