Module: SexySettings
- Defined in:
- lib/sexy_settings/core.rb,
lib/sexy_settings/base.rb,
lib/sexy_settings/version.rb,
lib/sexy_settings/printable.rb,
lib/sexy_settings/exceptions.rb,
lib/sexy_settings/configuration.rb,
lib/sexy_settings/sensitive_data_protector.rb
Overview
This module holds all custom sexy_settings exceptions
Defined Under Namespace
Modules: Printable Classes: Base, Configuration, SensitiveDataProtector
Constant Summary collapse
- VERSION =
'0.1.0'.freeze
- MissingDefaultError =
:nodoc:
Class.new(StandardError)
Class Method Summary collapse
-
.configuration ⇒ Object
Returns the global configuration object.
-
.configure ⇒ Object
Yields the global configuration object.
-
.reset ⇒ Object
Used internally to ensure examples get reloaded between multiple runs in the same process.
Class Method Details
.configuration ⇒ Object
Returns the global configuration object
10 11 12 |
# File 'lib/sexy_settings/core.rb', line 10 def self.configuration @configuration ||= SexySettings::Configuration.new end |
.configure ⇒ Object
Yields the global configuration object
Examples
SexySettings.configure do |config|
config. = 'OPTIONS'
end
21 22 23 24 25 26 27 |
# File 'lib/sexy_settings/core.rb', line 21 def self.configure if block_given? yield configuration else configuration end end |
.reset ⇒ Object
Used internally to ensure examples get reloaded between multiple runs in the same process.
5 6 7 |
# File 'lib/sexy_settings/core.rb', line 5 def self.reset configuration.class::DEFAULT_OPTIONS.keys.each { |key| configuration.send("#{key}=", nil) } end |