Module: EasyConfig::PathResolver
- Defined in:
- lib/easy_config/path_resolver.rb
Class Method Summary collapse
Class Method Details
.config_path ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/easy_config/path_resolver.rb', line 6 def self.config_path if defined?(@config_path) and @config_path File.join(@config_path, '*.yml') elsif defined?(Rails) File.join(Rails.root, 'config', '*.yml') elsif defined?(Sinatra) File.join(Sinatra::Application.root, 'config', '*.yml') else raise EasyConfig::UnknownConfigPath.new end end |
.config_path=(value) ⇒ Object
2 3 4 |
# File 'lib/easy_config/path_resolver.rb', line 2 def self.config_path=(value) @config_path = value end |