lib/neo4j/active_node/labels.rb in neo4j-9.6.2 vs lib/neo4j/active_node/labels.rb in neo4j-10.0.0.pre.alpha.1

- old
+ new

@@ -39,30 +39,20 @@ end.exec @_persisted_obj.labels.concat(labels) @_persisted_obj.labels.uniq! end - # Remove this method in 9.0.0 - def add_label(*_labels) - fail 'add_label has been removed in favor of `add_labels`' - end - # Removes one or more labels # Be careful, don't remove the label representing the Ruby class. # @see Neo4j-core def remove_labels(*labels) labels.inject(query_as(:n)) do |query, label| query.remove("n:`#{label}`") end.exec labels.each(&@_persisted_obj.labels.method(:delete)) end - # Remove this method in 9.0.0 - def remove_label(*_labels) - fail 'remove_label has been removed in favor of `remove_labels`' - end - def self._wrapped_classes WRAPPED_CLASSES end def self.add_wrapped_class(model) @@ -139,10 +129,10 @@ @mapped_label_name || label_for_model end # @return [Neo4j::Label] the label for this class def mapped_label - Neo4j::Core::Label.new(mapped_label_name, neo4j_session) + Neo4j::Core::Label.new(mapped_label_name) end def base_class unless self < Neo4j::ActiveNode fail "#{name} doesn't belong in a hierarchy descending from ActiveNode"