Class: Card::Rule::ReadRuleCache

Inherits:
Cache
  • Object
show all
Defined in:
lib/card/rule/read_rule_cache.rb

Class Method Summary collapse

Methods inherited from Cache

clear, lookup_key, pattern_code, populate, read, rows, setting_code

Class Method Details

.lookup_hashObject



20
21
22
23
24
25
26
# File 'lib/card/rule/read_rule_cache.rb', line 20

def lookup_hash
  rows.each_with_object({}) do |row, h|
    party_id = row["party_id"].to_i
    h[party_id] ||= []
    h[party_id] << row["read_rule_id"].to_i
  end
end