From 5a1b397a8eb9cef2286ea11950a7a3891b93f8eb Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 30 Oct 2015 19:18:47 +0100 Subject: Add support for configuring contact email without hardcoding it. --- lib/config.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/config.rb (limited to 'lib') 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 -- cgit v1.2.3