Method: Neon::Node::Rest#initialize

Defined in:
lib/neon/node/rest.rb

#initialize(node, session) ⇒ Node::Rest

Initialize the node with a neography node and a REST session

Parameters:

  • node (Hash)

    a neogrpahy node hash.

  • session (Session::Rest)

    the session this node was initialized to.



17
18
19
20
21
# File 'lib/neon/node/rest.rb', line 17

def initialize(node, session)
  @session = session # Set the session
  @node = node # Set the node
  @id = node["self"].split('/').last.to_i # Set the id
end