Class: AppConfig
- Inherits:
-
Object
- Object
- AppConfig
- Defined in:
- lib/app_config.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(filename = "") ⇒ AppConfig
constructor
A new instance of AppConfig.
- #load ⇒ Object
Constructor Details
#initialize(filename = "") ⇒ AppConfig
Returns a new instance of AppConfig.
4 5 6 |
# File 'lib/app_config.rb', line 4 def initialize(filename = "") @filename = filename.empty? ? default_filename : filename end |
Instance Method Details
#load ⇒ Object
8 9 10 11 12 |
# File 'lib/app_config.rb', line 8 def load config['environment']&.each do |key, value| ENV[key] = value end end |