lib/kryten/config.rb in kryten-0.3.8 vs lib/kryten/config.rb in kryten-0.3.9
- old
+ new
@@ -1,6 +1,7 @@
require 'yaml'
+require 'ostruct'
module Kryten
module Config
@@ -14,10 +15,10 @@
classname.first.downcase
else
classname.collect(&:downcase).join('-')
end
file = File.open(File.join(self.base_path, "config/#{classname}.yml"))
- YAML.load(file)[classname]
+ OpenStruct.new(YAML.load(file)[classname])
end
def config entry=nil
@config ||= configure
if entry