class Minder::Config
Constants
- DEFAULTS
Attributes
data[R]
location[RW]
Public Class Methods
new(location = nil)
click to toggle source
# File lib/minder/config.rb, line 16 def initialize(location = nil) self.location = location @data = {} end
Public Instance Methods
load()
click to toggle source
# File lib/minder/config.rb, line 21 def load if File.exists?(location.to_s) file = File.open(location, 'r') @data = JSON.parse(file.read, symbolize_names: true) end DEFAULTS.each do |key, value| data[key] ||= DEFAULTS[key] end end