Module: DatabaseCleaner::Neo4j::Base

Includes:
Generic::Base
Included in:
Deletion, Transaction
Defined in:
lib/database_cleaner/neo4j/base.rb

Instance Method Summary collapse

Methods included from Generic::Base

#cleaning, included

Instance Method Details

#databaseObject


27
28
29
# File 'lib/database_cleaner/neo4j/base.rb', line 27

def database
  db && default_db.merge(db) || default_db
end

#dbObject


15
16
17
# File 'lib/database_cleaner/neo4j/base.rb', line 15

def db
  @db ||= nil
end

#db=(desired_db) ⇒ Object


11
12
13
# File 'lib/database_cleaner/neo4j/base.rb', line 11

def db=(desired_db)
  @db = desired_db == :default ? nil : desired_db
end

#startObject


19
20
21
22
23
24
25
# File 'lib/database_cleaner/neo4j/base.rb', line 19

def start
  if db_type == :embedded_db and not session.running?
    session.start
  else
    session
  end
end