class Almicube::Config
Attributes
connection[RW]
key_format[RW]
Public Class Methods
config()
click to toggle source
# File lib/almicube/config.rb, line 17 def config if @instance.nil? && File.exists?(filepath) @instance = self.new YAML.load_file(filepath) end @instance ||= self.new {} end
filepath()
click to toggle source
# File lib/almicube/config.rb, line 13 def filepath @filepath ||= File.join(root.to_s, "config", "almicube.yml") end
reset()
click to toggle source
# File lib/almicube/config.rb, line 24 def reset @instance = nil end
root()
click to toggle source
# File lib/almicube/config.rb, line 9 def root Rails.root if defined? Rails end