Class: Kharon::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/kharon/configuration.rb

Overview

Simple wrapper for the configuration.

Author:

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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?

Returns:

  • (Boolean)


24
25
26
# File 'lib/kharon/configuration.rb', line 24

def uses_exceptions?
  @configuration[:exceptions]
end