Module: Ohm
- Defined in:
- lib/ohm.rb,
lib/ohm/json.rb
Defined Under Namespace
Modules: Collection, Utils Classes: Error, IndexNotFound, List, MissingID, Model, MutableSet, Set, UniqueIndexViolation
Constant Summary collapse
- LUA_CACHE =
Hash.new { |h, k| h[k] = Hash.new }
- LUA_SAVE =
File.("../ohm/lua/save.lua", __FILE__)
- LUA_DELETE =
File.("../ohm/lua/delete.lua", __FILE__)
Class Method Summary collapse
-
.flush ⇒ Object
Wrapper for Ohm.redis.call(“FLUSHDB”).
-
.redis ⇒ Object
Use this if you want to do quick ad hoc redis commands against the defined Ohm connection.
- .redis=(redis) ⇒ Object
Class Method Details
.flush ⇒ Object
Wrapper for Ohm.redis.call(“FLUSHDB”).
108 109 110 |
# File 'lib/ohm.rb', line 108 def self.flush redis.call("FLUSHDB") end |
.redis ⇒ Object
Use this if you want to do quick ad hoc redis commands against the defined Ohm connection.
Examples:
Ohm.redis.call("SET", "foo", "bar")
Ohm.redis.call("FLUSH")
99 100 101 |
# File 'lib/ohm.rb', line 99 def self.redis @redis ||= Redic.new end |
.redis=(redis) ⇒ Object
103 104 105 |
# File 'lib/ohm.rb', line 103 def self.redis=(redis) @redis = redis end |