Class: ChefWorkflow::DatabaseSupport
- Inherits:
-
SQLite3::Database
- Object
- SQLite3::Database
- ChefWorkflow::DatabaseSupport
- Includes:
- Singleton
- Defined in:
- lib/chef-workflow/support/db.rb,
lib/chef-workflow/support/db/basic.rb,
lib/chef-workflow/support/db/group.rb
Defined Under Namespace
Classes: Collection, Generic, List, Map, Object, Set, VMGroup
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize ⇒ DatabaseSupport
constructor
A new instance of DatabaseSupport.
- #reconnect ⇒ Object
Constructor Details
#initialize ⇒ DatabaseSupport
Returns a new instance of DatabaseSupport.
11 12 13 |
# File 'lib/chef-workflow/support/db.rb', line 11 def initialize super(connect) end |
Instance Method Details
#connect ⇒ Object
20 21 22 23 24 |
# File 'lib/chef-workflow/support/db.rb', line 20 def connect vm_file = ChefWorkflow::GeneralSupport.vm_file FileUtils.mkdir_p(File.dirname(vm_file)) SQLite3::Database.new(vm_file) end |
#reconnect ⇒ Object
15 16 17 18 |
# File 'lib/chef-workflow/support/db.rb', line 15 def reconnect close rescue nil __setobj__(connect) end |