Class | AppConfig::Storage::Sqlite |
In: |
lib/app_config/storage/sqlite.rb
|
Parent: | Storage::Base |
SQLite3 storage method.
DEFAULTS | = | { :database => File.expand_path(File.join(ENV['HOME'], '.app_config.sqlite3')), :table => 'app_config' |
Loads @data with the SQLite3 database located at path. @data will be the Hashish that is accessed like AppConfig[:key].
Defaults to $HOME/.app_config.sqlite3
# File lib/app_config/storage/sqlite.rb, line 23 def initialize(options) super(DEFAULTS.merge(options)) @db = SQLite3::Database.open(@options[:database]) @data = load_from_database end