diff --git a/lib/neography/relationship.rb b/lib/neography/relationship.rb index 1ebd19c..febcc9b 100644 --- a/lib/neography/relationship.rb +++ b/lib/neography/relationship.rb @@ -55,6 +55,11 @@ def del def exist? !self.start_node.neo_server.get_relationship(self.neo_id).nil? end + + def attributes + attrs = self.methods - OpenStruct.instance_methods - Neography::Relationship.instance_methods + attrs.values_at(*self.each_index.select {|i| i.odd?}) + end def other_node(node) if node == @start_node