Class: Fenix::Settings
- Inherits:
-
Object
- Object
- Fenix::Settings
- Defined in:
- lib/fenix/core/settings.rb
Instance Method Summary collapse
-
#[](key) ⇒ Object
Returns the provided configuration option.
-
#[]=(key, value) ⇒ value
Sets the provided configuration option.
-
#initialize(file = nil) ⇒ Settings
constructor
A new instance of Settings.
Constructor Details
#initialize(file = nil) ⇒ Settings
Returns a new instance of Settings.
5 6 7 |
# File 'lib/fenix/core/settings.rb', line 5 def initialize(file = nil) @settings = {} end |
Instance Method Details
#[](key) ⇒ Object
Returns the provided configuration option
24 25 26 |
# File 'lib/fenix/core/settings.rb', line 24 def [](key) @settings[key.to_sym] end |
#[]=(key, value) ⇒ value
Sets the provided configuration option
42 43 44 |
# File 'lib/fenix/core/settings.rb', line 42 def []=(key, value) @settings[key.to_sym] = value end |