Class: StrokeDB::HashSlotValue

Inherits:
LazyMappingHash show all
Defined in:
lib/strokedb/document/slot.rb

Instance Method Summary collapse

Methods inherited from LazyMappingHash

#[], #_each, #_keys, #_square_brackets, #_square_brackets_set, #_values, #class, #each, #initialize, #keys, #map_with, #unmap_with, #values

Methods inherited from Hash

#_stroke_split_merge_result, #except, #reverse_merge, #reverse_merge!, #stringify_keys, #stroke_diff, #stroke_merge, #stroke_patch, #to_raw

Constructor Details

This class inherits a constructor from StrokeDB::LazyMappingHash

Instance Method Details

#[]=(*args) ⇒ Object



10
11
12
13
# File 'lib/strokedb/document/slot.rb', line 10

def []=(*args)
  super(*args)
  @modification_callback.call if @modification_callback
end

#with_modification_callback(&block) ⇒ Object



6
7
8
9
# File 'lib/strokedb/document/slot.rb', line 6

def with_modification_callback(&block)
  @modification_callback = block
  self
end