Module: EM::Redis
- Defined in:
- lib/em/redis.rb,
lib/em-synchrony/em-redislite.rb
Defined Under Namespace
Classes: Client, ConnectionError, DataError, Error
Constant Summary collapse
- VERSION =
'0.2.2'
- DEFAULTS =
{ host: '127.0.0.1', port: 6379 }
Class Method Summary collapse
Class Method Details
.connect(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/em/redis.rb', line 13 def self.connect = {} = DEFAULTS.merge() begin EM.connect [:host], [:port], Client, { host: [:host], port: [:port] } rescue EM::ConnectionError => e client = Client.new(nil) client.fail(Error.new(e.)) client end end |