Sha256: 2ba520672d073acec50c16f801493275314688d7ed1d19fbef7502b1a788f460

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

require "neoid/version"
require "neoid/model_config"
require "neoid/model_additions"
require "neoid/node"
require "neoid/relationship"

module Neoid
  class << self
    attr_accessor :db
    attr_accessor :logger
    attr_accessor :ref_node
    
    def db
      raise "Must set Neoid.db with a Neography::Rest instance" unless @db
      @db
    end
    
    def logger
      @logger ||= Logger.new(ENV['NEOID_LOG'] ? $stdout : '/dev/null')
    end
    
    def ref_node
      @ref_node ||= Neography::Node.load(Neoid.db.get_root['self'])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neoid-0.0.2 lib/neoid.rb