Class: WorkflowManager::Server::KyotoDB
- Inherits:
-
Object
- Object
- WorkflowManager::Server::KyotoDB
- Defined in:
- lib/workflow_manager/server.rb
Instance Method Summary collapse
-
#initialize(db_file) ⇒ KyotoDB
constructor
A new instance of KyotoDB.
- #transaction {|@db| ... } ⇒ Object
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
86 87 88 89 90 |
# File 'lib/workflow_manager/server.rb', line 86 def transaction @db.open(@file) yield(@db) @db.close end |