Class: Kharon::Configuration
- Inherits:
-
Object
- Object
- Kharon::Configuration
- Includes:
- Singleton
- Defined in:
- lib/kharon/configuration.rb
Overview
Simple wrapper for the configuration.
Instance Attribute Summary (collapse)
-
- (Object) configuration
Returns the value of attribute configuration.
Instance Method Summary (collapse)
-
- (Configuration) initialize
constructor
Constructor of the configuration, initializes default values for each usable key.
- - (Object) use_exceptions(use = true)
- - (Boolean) uses_exceptions?
Constructor Details
- (Configuration) initialize
Constructor of the configuration, initializes default values for each usable key.
14 15 16 17 18 |
# File 'lib/kharon/configuration.rb', line 14 def initialize @configuration = { exceptions: true } end |
Instance Attribute Details
- (Object) configuration
Returns the value of attribute configuration
11 12 13 |
# File 'lib/kharon/configuration.rb', line 11 def configuration @configuration end |
Instance Method Details
- (Object) use_exceptions(use = true)
20 21 22 |
# File 'lib/kharon/configuration.rb', line 20 def use_exceptions(use = true) @configuration[:exceptions] = use end |
- (Boolean) uses_exceptions?
24 25 26 |
# File 'lib/kharon/configuration.rb', line 24 def uses_exceptions? @configuration[:exceptions] end |