Sha256: fd7876cd722030c27ca3a60d42b86470343de67dfca8004a12189477aa2c9b45
Contents?: true
Size: 360 Bytes
Versions: 4
Compression:
Stored size: 360 Bytes
Contents
module Sharp class Config def initialize(env, files) files.each do |file| puts file.inspect attr = File.basename(file, '.yml').to_sym puts attr.inspect (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.3 | lib/sharp/config.rb |
sharp-0.3.2 | lib/sharp/config.rb |
sharp-0.3.1 | lib/sharp/config.rb |
sharp-0.3.0 | lib/sharp/config.rb |