lib/config_loader/map.rb in configloader-0.1.1 vs lib/config_loader/map.rb in configloader-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
module ConfigLoader
- class Map < Hash
+ class Map
attr_reader :file_name, :running_env, :project_root
def initialize(file_name, running_env, project_root)
raise MissingConfigFileNameError unless file_name
@@ -18,14 +18,11 @@
def full_file_name
"#{project_root}/config/#{file_name}"
end
- def populate
- file_content[@running_env].each do |key, value|
- self[key] = value
- self[key.to_sym] = value
- end
+ def load
+ file_content[@running_env]
end
def method_missing(method_name)
self[method_name]
end