def update(event, target)
      case event
      when :document_removed, :document_deleted
        @documents = @documents.delete_if { |element| element == target }
        target.delete_observer(self)
      when :document_added
        @documents.push target
        target.add_observer(self)
      when :folder_deleted
        @folders = @folders.delete_if { |element| element == target }
      else
        raise ArgumentError.new(event)
      end
    end
def update(event, target)
      case event
      when :document_removed, :document_deleted
        @documents = @documents.delete_if { |element| element == target }
        target.delete_observer(self)
      when :document_added
        @documents.push target
        target.add_observer(self)
      when :folder_deleted
        @folders = @folders.delete_if { |element| element == target }
      else
        raise ArgumentError.new(event)
      end
    end
observer callback