Class: RackStep::GlobalConfiguration

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

Overview

A singleton class with a settings hash attribute which may be used to to store all ‘global’ settings (eg: database connections, etc). This settings variable will be injected into every controller by RackStep.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobalConfiguration

Defines a Hash where the settings shall be stored.



20
21
22
# File 'lib/global_configuration.rb', line 20

def initialize
  @settings = Hash.new
end

Instance Attribute Details

#settingsObject

Returns the value of attribute settings.



17
18
19
# File 'lib/global_configuration.rb', line 17

def settings
  @settings
end