Class: BomDB::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/bomdb/config.rb

Constant Summary collapse

DEFAULT_DATA_DIR =
File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'data'))

Instance Method Summary collapse

Instance Method Details

#data_dirObject



22
23
24
# File 'lib/bomdb/config.rb', line 22

def data_dir
  @data.fetch('data_dir', DEFAULT_DATA_DIR)
end

#db_pathObject



18
19
20
# File 'lib/bomdb/config.rb', line 18

def db_path
  @data.fetch('db_path', File.join(data_dir, db_file))
end