class Neography::Config

Attributes

authentication[RW]
cypher_path[RW]
directory[RW]
gremlin_path[RW]
http_receive_timeout[RW]
http_send_timeout[RW]
log_enabled[RW]
log_file[RW]
logger[RW]
max_execution_time[RW]
max_threads[RW]
parser[RW]
password[RW]
port[RW]
protocol[RW]
proxy[RW]
server[RW]
slow_log_threshold[RW]
username[RW]

Public Class Methods

new() click to toggle source
# File lib/neography/config.rb, line 12
def initialize
  set_defaults
end

Public Instance Methods

to_hash() click to toggle source
# File lib/neography/config.rb, line 16
def to_hash
  {
    :protocol              => @protocol,
    :server                => @server,
    :port                  => @port,
    :directory             => @directory,
    :cypher_path           => @cypher_path,
    :gremlin_path          => @gremlin_path,
    :log_file              => @log_file,
    :log_enabled           => @log_enabled,
    :logger                => @logger,
    :slow_log_threshold    => @slow_log_threshold,
    :max_threads           => @max_threads,
    :authentication        => @authentication,
    :username              => @username,
    :password              => @password,
    :parser                => @parser,
    :max_execution_time    => @max_execution_time,
    :proxy                 => @proxy,
    :http_send_timeout     => @http_send_timeout,
    :http_receive_timeout  => @http_receive_timeout
  }
end

Private Instance Methods

set_defaults() click to toggle source
# File lib/neography/config.rb, line 42
def set_defaults
  @protocol             = "http://"
  @server               = "localhost"
  @port                 = 7474
  @directory            = ""
  @cypher_path          = "/cypher"
  @gremlin_path         = "/ext/GremlinPlugin/graphdb/execute_script"
  @log_file             = "neography.log"
  @log_enabled          = false
  @slow_log_threshold   = 0
  @max_threads          = 20
  @authentication       = nil
  @username             = nil
  @password             = nil
  @parser               = MultiJsonParser
  @max_execution_time   = 6000
  @proxy                = nil
  @http_send_timeout    = 1200
  @http_receive_timeout = 1200
  end