Class: MemDB::Indexation
- Inherits:
-
Object
- Object
- MemDB::Indexation
- Defined in:
- lib/mem_db/indexation.rb
Instance Method Summary collapse
- #add(raw, value) ⇒ Object
-
#initialize(index) ⇒ Indexation
constructor
A new instance of Indexation.
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 |