Class: Relaton::Cli::RelatonDb
- Inherits:
-
Object
- Object
- Relaton::Cli::RelatonDb
- Includes:
- Singleton
- Defined in:
- lib/relaton/cli.rb
Constant Summary collapse
- DBCONF =
"#{Dir.home}/.relaton/dbpath".freeze
Instance Method Summary collapse
Instance Method Details
#db(dir) ⇒ Relaton::Db
19 20 21 22 23 24 25 26 |
# File 'lib/relaton/cli.rb', line 19 def db(dir) if dir File.write DBCONF, dir, encoding: "UTF-8" @db = Relaton::Db.new dir, nil else @db ||= Relaton::Db.new dbpath, nil end end |