Class: Neography::Rest::NodeTraversal
- Inherits:
-
Object
- Object
- Neography::Rest::NodeTraversal
- Extended by:
- Paths
- Includes:
- Helpers
- Defined in:
- lib/neography/rest/node_traversal.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ NodeTraversal
constructor
A new instance of NodeTraversal.
- #traverse(id, return_type, description) ⇒ Object
Methods included from Paths
Methods included from Helpers
Constructor Details
#initialize(connection) ⇒ NodeTraversal
Returns a new instance of NodeTraversal.
9 10 11 |
# File 'lib/neography/rest/node_traversal.rb', line 9 def initialize(connection) @connection = connection end |
Instance Method Details
#traverse(id, return_type, description) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/neography/rest/node_traversal.rb', line 13 def traverse(id, return_type, description) = { :body => { "order" => get_order(description["order"]), "uniqueness" => get_uniqueness(description["uniqueness"]), "relationships" => description["relationships"], "prune_evaluator" => description["prune evaluator"], "return_filter" => description["return filter"], "max_depth" => get_depth(description["depth"]) }.to_json, :headers => json_content_type } type = get_type(return_type) @connection.post(traversal_path(:id => get_id(id), :type => type), ) || [] end |