lib/compo/parent_tracker.rb in compo-0.1.5 vs lib/compo/parent_tracker.rb in compo-0.2.0

- old
+ new

@@ -1,6 +1,7 @@ require 'forwardable' +require 'compo/parentless' module Compo # Basic implementation of parent tracking as a mixin # # This implements #parent, #update_parent and #remove_parent to track the @@ -56,9 +57,9 @@ # @example Update this Leaf's parent and ID function. # movable.update_parent(new_parent, new_id_function) # # @return [void] def remove_parent - update_parent(nil, -> { nil }) + update_parent(Parentless.new, -> { nil }) end end end