class BatchLoader::Executor
Constants
- NAMESPACE
Attributes
items_by_block[R]
loaded_values_by_block[R]
Public Class Methods
clear_current()
click to toggle source
# File lib/batch_loader/executor.rb, line 14 def self.clear_current Thread.current[NAMESPACE] = nil end
current()
click to toggle source
# File lib/batch_loader/executor.rb, line 10 def self.current Thread.current[NAMESPACE] end
ensure_current()
click to toggle source
# File lib/batch_loader/executor.rb, line 6 def self.ensure_current Thread.current[NAMESPACE] ||= new end
new()
click to toggle source
# File lib/batch_loader/executor.rb, line 20 def initialize @items_by_block = Hash.new { |hash, key| hash[key] = Set.new } @loaded_values_by_block = Hash.new { |hash, key| hash[key] = {} } end