class Condition::Reader::RedisReader

Public Class Methods

new(redis) click to toggle source
# File lib/condition/reader/redis_reader.rb, line 7
def initialize(redis)
  @redis = redis 
end

Public Instance Methods

read_sheet(path, sheet_index) click to toggle source
# File lib/condition/reader/redis_reader.rb, line 11
def read_sheet(path, sheet_index)
  data = @redis.get(path)
  raise "redis key name #{path} not found" if data.nil? || data == ""
  JSON.parse(data, {:symbolize_names => true})
end