Class: Medivo::ResourceConfig
- Inherits:
-
Object
- Object
- Medivo::ResourceConfig
- Defined in:
- app/models/medivo/resource_config.rb
Class Method Summary collapse
Class Method Details
.find(resource_file) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/models/medivo/resource_config.rb', line 7 def self.find resource_file @resources ||= {} return @resources[resource_file] if @resources[resource_file] config_file = Rails.root.join('config', 'medivo', resource_file) config = YAML.load_file(config_file) @resources[resource_file] = OpenStruct.new config[Rails.env] end |