class Backend
Attributes
current_database[RW]
host[RW]
port[RW]
Public Class Methods
new(opts = {})
click to toggle source
# File lib/engine/app/lib/backend.rb, line 6 def initialize(opts = {}) @host = opts[:host] @port = opts[:port] @current_database = opts[:current_database] end
Public Instance Methods
redis()
click to toggle source
# File lib/engine/app/lib/backend.rb, line 12 def redis @redis ||= Redis.new(host: host, port: port) @redis.select(current_database) @redis end