Method: Hyperstack::Internal::State::Mapper.update_objects_to_observe
- Defined in:
- lib/hyperstack/internal/state/mapper.rb
.update_objects_to_observe(observer = @current_observer) ⇒ Object
TODO: see if we can get rid of all this and simply calling remove_current_observers_and_objects at the START of each components rendering cycle (i.e. before_mount and before_update)
132 133 134 135 136 137 |
# File 'lib/hyperstack/internal/state/mapper.rb', line 132 def update_objects_to_observe(observer = @current_observer) remove_current_observers_and_objects(observer) objects = new_objects.delete(observer) objects.each { |object| current_observers[object] << observer } if objects current_objects[observer] = objects end |