Class: AocCli::Paths::Database

Inherits:
Config
  • Object
show all
Defined in:
lib/aoc_cli/paths.rb

Class Method Summary collapse

Methods inherited from Config

create, path

Class Method Details

.cfg(name) ⇒ Object



91
92
93
94
95
# File 'lib/aoc_cli/paths.rb', line 91

def self.cfg(name)
  FileUtils.mkdir_p(dir) unless Dir
    .exist?(dir)
  "#{dir}/#{name}.db"
end

.dirObject



88
89
90
# File 'lib/aoc_cli/paths.rb', line 88

def self.dir
  "#{super}/db"
end

.root(name) ⇒ Object



96
97
98
# File 'lib/aoc_cli/paths.rb', line 96

def self.root(name)
  "#{__dir__}/db/#{name}.db"
end