module Neography::Index
Public Class Methods
included(base)
click to toggle source
# File lib/neography/index.rb, line 4 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
add_to_index(index, key, value, unique = false)
click to toggle source
# File lib/neography/index.rb, line 8 def add_to_index(index, key, value, unique = false) if self.is_a? Neography::Node self.neo_server.add_node_to_index(index, key, value, self.neo_id, unique) else self.neo_server.add_relationship_to_index(index, key, value, self.neo_id) end end
remove_from_index(*args)
click to toggle source
# File lib/neography/index.rb, line 16 def remove_from_index(*args) if self.is_a? Neography::Node self.neo_server.remove_node_from_index(*args) else self.neo_server.remove_relationship_from_index(*args) end end