class Neoon::Cypher::Handler
Attributes
args[R]
query[R]
result[R]
Public Class Methods
new(hash)
click to toggle source
# File lib/neoon/cypher/handler.rb, line 7 def initialize(hash) @query = hash[:query] @args = hash[:args] @result = begin make_cypher_request(query, args) rescue Exception => e { :error => e } end end
Public Instance Methods
to_cypher()
click to toggle source
# File lib/neoon/cypher/handler.rb, line 18 def to_cypher [query.gsub(/\s+/, ' ').strip, args] end
Protected Instance Methods
make_cypher_request(query, args = nil)
click to toggle source
# File lib/neoon/cypher/handler.rb, line 24 def make_cypher_request(query, args = nil) Neoon.db.cypher(query, args) end