Skip to content

Commit

Permalink
Merge pull request #7 from namxam/master
Browse files Browse the repository at this point in the history
Relationship neo server connection
  • Loading branch information
maxdemarzi committed Jun 5, 2011
2 parents 25f02cd + 4b097f9 commit 128cd36
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/neography/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ def load(*args)
end
end

def initialize(hash=nil, neo_server=nil)
def initialize(hash=nil, server=nil)
super(hash)
@start_node = hash["start"].split('/').last
@end_node = hash["end"].split('/').last
@rel_type = hash["type"]
neo_server = server
end

def neo_server
@neo_server ||= self.start_node.neo_server
end

def neo_server=(server)
@neo_server = server
end

def del
Expand Down

0 comments on commit 128cd36

Please sign in to comment.