module UserSettings

Similar to github.com/thoughtbot/high_voltage/blob/master/lib/high_voltage.rb

Constants

VERSION

Public Class Methods

configure() { |self| ... } click to toggle source
# File lib/user_settings.rb, line 27
def self.configure
  yield self
end
redis() click to toggle source
# File lib/user_settings.rb, line 31
def self.redis
  if @@redis_options
    @@redis_connection ||= @@redis_options.delete(:redis_connection)
    if @@redis_connection == nil
      @@redis_connection ||= Redis.new({:host => 'localhost', :port => 6379, :db => 1}.merge(@@redis_options))
    end
  end
  @@redis_connection
end