Module: YAML

Defined in:
lib/merrol/lib/yaml.rb

Constant Summary collapse

LOCATIONS =
{'config' => 'config', 'view' => 'lib/merrol/views'}

Class Method Summary collapse

Class Method Details

.method_missing(meth, *args, &block) ⇒ Object



4
5
6
7
8
# File 'lib/merrol/lib/yaml.rb', line 4

def self.method_missing(meth, *args, &block)
  dir = LOCATIONS[meth.to_s.gsub(/load_/, '')]
  super unless dir
  self.load File.open(File.app_relative("#{dir}/#{args[0]}.yml"))
end