Sha256: 24335da3e352f4abccfef6a81696c937f1ede49072e2ac4a80319fcece935227
Contents?: true
Size: 339 Bytes
Versions: 3
Compression:
Stored size: 339 Bytes
Contents
# Settings module Vapid class Settings def self.method_missing(sym, *) (@settings ||= load_settings)[sym.to_s] end def self.load_settings settings_file = File.join(Dir.pwd, "config", "settings.yml") File.exist?(settings_file) ? YAML.load_file(settings_file)[Server.environment.to_s] : {} end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vapid-0.1.2 | lib/vapid/settings.rb |
vapid-0.1.1 | lib/vapid/settings.rb |
vapid-0.1.0 | lib/vapid/settings.rb |