Class: LiveQueryPool

Inherits:
Volt::GenericPool show all
Defined in:
app/volt/tasks/live_query/live_query_pool.rb

Instance Attribute Summary

Attributes inherited from Volt::GenericPool

#pool

Instance Method Summary collapse

Methods inherited from Volt::GenericPool

#create_new_item, #lookup_all, #remove, #transform_item

Constructor Details

#initialize(data_store) ⇒ LiveQueryPool

Returns a new instance of LiveQueryPool.



5
6
7
8
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 5

def initialize(data_store)
  super()
  @data_store = data_store
end

Instance Method Details

#lookup(collection, query) ⇒ Object



10
11
12
13
14
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 10

def lookup(collection, query)
  query = normalize_query(query)

  super(collection, query)
end

#updated_collection(collection, skip_channel) ⇒ Object



16
17
18
19
20
# File 'app/volt/tasks/live_query/live_query_pool.rb', line 16

def updated_collection(collection, skip_channel)
  lookup_all(collection).each do |live_query|
    live_query.run(skip_channel)
  end
end