module SexySettings

Core module

This module holds all custom sexy_settings exceptions

Constants

VERSION

Public Class Methods

configuration() click to toggle source

Returns the global configuration object

# File lib/sexy_settings/core.rb, line 10
def self.configuration
  @configuration ||= SexySettings::Configuration.new
end
configure() { |configuration| ... } click to toggle source

Yields the global configuration object

Examples

SexySettings.configure do |config|

config.env_variable_with_options = 'OPTIONS'

end

# File lib/sexy_settings/core.rb, line 21
def self.configure
  if block_given?
    yield configuration
  else
    configuration
  end
end
reset() click to toggle source

Used internally to ensure examples get reloaded between multiple runs in the same process.

# File lib/sexy_settings/core.rb, line 5
def self.reset
  configuration.class::DEFAULT_OPTIONS.keys.each { |key| configuration.send("#{key}=", nil) }
end