Class: AppConfig
- Inherits:
-
Object
- Object
- AppConfig
- Defined in:
- lib/app_config.rb
Direct Known Subclasses
Class Method Summary collapse
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.
20 21 22 |
# File 'lib/app_config.rb', line 20 def initialize(filename = "") @filename = filename.empty? ? default_filename : filename end |
Class Method Details
.load ⇒ Object
5 6 7 |
# File 'lib/app_config.rb', line 5 def load new(app_config_path).load end |
Instance Method Details
#load ⇒ Object
24 25 26 27 28 |
# File 'lib/app_config.rb', line 24 def load config['environment']&.each do |key, value| ENV[key] = value.to_s end end |