diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-10-30 19:18:47 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-10-30 19:18:47 +0100 |
commit | 5a1b397a8eb9cef2286ea11950a7a3891b93f8eb (patch) | |
tree | be8ff61c142d70057b79ea90357e37d5b6e83ff3 /lib | |
parent | db3b350540b559ff222de123f99731e21da6fb62 (diff) | |
download | norsk-urskog-registrations-5a1b397a8eb9cef2286ea11950a7a3891b93f8eb.tar.gz norsk-urskog-registrations-5a1b397a8eb9cef2286ea11950a7a3891b93f8eb.tar.bz2 norsk-urskog-registrations-5a1b397a8eb9cef2286ea11950a7a3891b93f8eb.zip |
Add support for configuring contact email without hardcoding it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/config.rb b/lib/config.rb new file mode 100644 index 0000000..bc42c34 --- /dev/null +++ b/lib/config.rb @@ -0,0 +1,14 @@ +require 'yaml' + +class Config + attr_reader :contact_email + + def self.load + conf = YAML.load(IO.read("config.yml")) + Config.new(conf) + end + + def initialize(conf) + @contact_email = conf['contact_email'] + end +end |