Class: Stockman::Logic::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/stockman/logic/storage.rb

Class Method Summary collapse

Class Method Details

.obtain_amount(key, field) ⇒ Object



12
13
14
15
16
# File 'lib/stockman/logic/storage.rb', line 12

def self.obtain_amount(key, field)
  value = Logic.redis.hget(key, field)

  Utils.deserialize_amount(value)
end

.obtain_hash(key) ⇒ Object



8
9
10
# File 'lib/stockman/logic/storage.rb', line 8

def self.obtain_hash(key)
  Logic.redis.hgetall(key)
end

.obtain_set(key) ⇒ Object



4
5
6
# File 'lib/stockman/logic/storage.rb', line 4

def self.obtain_set(key)
  Logic.redis.smembers(key)
end