Module: Blendris
- Defined in:
- lib/blendris.rb,
lib/blendris/set.rb,
lib/blendris/list.rb,
lib/blendris/node.rb,
lib/blendris/zset.rb,
lib/blendris/model.rb,
lib/blendris/types.rb,
lib/blendris/utils.rb,
lib/blendris/errors.rb,
lib/blendris/string.rb,
lib/blendris/integer.rb,
lib/blendris/accessor.rb,
lib/blendris/reference.rb,
lib/blendris/reference_set.rb,
lib/blendris/reference_base.rb
Defined Under Namespace
Modules: RedisAccessor, Utils Classes: Model, RedisInteger, RedisList, RedisNode, RedisReference, RedisReferenceBase, RedisReferenceSet, RedisSet, RedisSortedSet, RedisString
Constant Summary collapse
- VERSION =
'1.2'
Class Attribute Summary collapse
-
.database ⇒ Object
Returns the value of attribute database.
-
.host ⇒ Object
Returns the value of attribute host.
-
.port ⇒ Object
Returns the value of attribute port.
Class Method Summary collapse
-
.flushdb ⇒ Object
This will delete all keys in the current database.
-
.redis ⇒ Object
Retrieve the connection to the current Redis database.
Class Attribute Details
.database ⇒ Object
Returns the value of attribute database.
5 6 7 |
# File 'lib/blendris/accessor.rb', line 5 def database @database end |
.host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/blendris/accessor.rb', line 5 def host @host end |
.port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/blendris/accessor.rb', line 5 def port @port end |
Class Method Details
.flushdb ⇒ Object
This will delete all keys in the current database. Dangerous!
39 40 41 |
# File 'lib/blendris/accessor.rb', line 39 def flushdb redis.flushdb end |
.redis ⇒ Object
Retrieve the connection to the current Redis database.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/blendris/accessor.rb', line 27 def redis parms = { :host => @host, :port => @port, :db => @database } $_redis_connection ||= Redis.new(parms) end |