Sha256: 5ff6a5b11b64e0cd61d3517530c10ec257c3c5f9e3b79b324e458a1a60fd35c2
Contents?: true
Size: 396 Bytes
Versions: 23
Compression:
Stored size: 396 Bytes
Contents
require 'yaml' require 'ostruct' module Medivo class ResourceConfig 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 end end
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
medivo-0.2.1 | app/models/medivo/resource_config.rb |
medivo-0.2.0 | app/models/medivo/resource_config.rb |
medivo-0.1.25 | app/models/medivo/resource_config.rb |