summaryrefslogtreecommitdiff
path: root/lib/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config.rb')
-rw-r--r--lib/config.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/config.rb b/lib/config.rb
new file mode 100644
index 0000000..dded140
--- /dev/null
+++ b/lib/config.rb
@@ -0,0 +1,18 @@
+require 'yaml'
+
+module LeapCA
+ class Config
+ def initialize(filename)
+ file = File.new(filename, 'r')
+ @hash = YAML::load(file)
+ end
+
+ def server
+ @hash['server']
+ end
+
+ def database
+ @hash['database']
+ end
+ end
+end