Class: HolePicker::OfflineDatabase

Inherits:
Database
  • Object
show all
Includes:
HasLogger
Defined in:
lib/holepicker/offline_database.rb

Constant Summary collapse

OFFLINE_JSON_FILE =
File.expand_path('../data/data.json', __FILE__)

Instance Attribute Summary

Attributes inherited from Database

#vulnerabilities

Class Method Summary collapse

Methods included from HasLogger

included, #logger

Methods inherited from Database

#compatible?, #initialize, load_from_json_file

Constructor Details

This class inherits a constructor from HolePicker::Database

Class Method Details

.loadObject



10
11
12
13
14
15
# File 'lib/holepicker/offline_database.rb', line 10

def self.load
  load_from_json_file(File.read(OFFLINE_JSON_FILE))
rescue Exception => e
  logger.fail "Can't load local data file: #{e}"
  exit 1
end