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.



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

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

Instance Method Details

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

Yields:

  • (@db)


89
90
91
92
93
# File 'lib/workflow_manager/server.rb', line 89

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