Class: WorkflowManager::Server::KyotoDB

Inherits:
Object
  • Object
show all
Defined in:
lib/workflow_manager/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(db_file) ⇒ KyotoDB

Returns a new instance of KyotoDB.



82
83
84
85
# File 'lib/workflow_manager/server.rb', line 82

def initialize(db_file)
  @file = db_file
  @db = KyotoCabinet::DB.new
end

Instance Method Details

#transaction {|@db| ... } ⇒ Object

Yields:

  • (@db)


86
87
88
89
90
# File 'lib/workflow_manager/server.rb', line 86

def transaction
  @db.open(@file)
  yield(@db)
  @db.close
end