Module: Array::Unique::Compositing::ArrayInterface

Extended by:
Module::Cluster
Includes:
Compositing::ArrayInterface, ArrayInterface
Included in:
Array::Unique::Compositing
Defined in:
lib/array/unique/compositing/array_interface.rb

Instance Method Summary collapse

Instance Method Details

#[]=(local_index, object) ⇒ Object

[]= #



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/array/unique/compositing/array_interface.rb', line 35

def []=( local_index, object )
  
  did_set = false

  if @unique_keys.has_key?( object )                              and 
     @parent_index_map                                            and
     parent_index = @parent_index_map.parent_index( local_index ) and 
     @parent_composite_object[ parent_index ] == object
    
    @parent_index_map.local_set( local_index )
  else
    super
  end
  
  return did_set
  
end