Sha256: 1b444116184aae11e33d042e261d3a007f7e4f7d9db724523213a7d045558e7e

Contents?: true

Size: 308 Bytes

Versions: 4

Compression:

Stored size: 308 Bytes

Contents

module Sharp
  class Config
    def initialize(env, files)
      files.each do |file|
        attr = File.basename(file, '.yml').to_sym
        (class << self; self; end).send(:attr_accessor, attr)
        send("#{attr}=", YAML.load_file(file).symbolize_keys[env].symbolize_keys)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sharp-0.3.7 lib/sharp/config.rb
sharp-0.3.6 lib/sharp/config.rb
sharp-0.3.5 lib/sharp/config.rb
sharp-0.3.4 lib/sharp/config.rb