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.24 app/models/medivo/resource_config.rb
medivo-0.2.21 app/models/medivo/resource_config.rb
medivo-0.2.20 app/models/medivo/resource_config.rb
medivo-0.2.19 app/models/medivo/resource_config.rb
medivo-0.2.18 app/models/medivo/resource_config.rb
medivo-0.2.17 app/models/medivo/resource_config.rb
medivo-0.2.16 app/models/medivo/resource_config.rb
medivo-0.2.15 app/models/medivo/resource_config.rb
medivo-0.2.14 app/models/medivo/resource_config.rb
medivo-0.2.13 app/models/medivo/resource_config.rb
medivo-0.2.12 app/models/medivo/resource_config.rb
medivo-0.2.11 app/models/medivo/resource_config.rb
medivo-0.2.10 app/models/medivo/resource_config.rb
medivo-0.2.9 app/models/medivo/resource_config.rb
medivo-0.2.8 app/models/medivo/resource_config.rb
medivo-0.2.7 app/models/medivo/resource_config.rb
medivo-0.2.6 app/models/medivo/resource_config.rb
medivo-0.2.5 app/models/medivo/resource_config.rb
medivo-0.2.3 app/models/medivo/resource_config.rb
medivo-0.2.2 app/models/medivo/resource_config.rb