Skip to content

Instantly share code, notes, and snippets.

@davidcelis
Created January 24, 2012 19:51
Show Gist options
  • Save davidcelis/1672173 to your computer and use it in GitHub Desktop.
Save davidcelis/1672173 to your computer and use it in GitHub Desktop.
module Engine
mattr_accessor :user_class, :redis, :redis_host, :redis_port
class << self
def user_class
@@user_class.constantize
end
def redis
@@redis ||= Redis.new(@@redis_host, @@redis_port)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment