Module: Collector
- Includes:
- Enumerable
- Defined in:
- lib/q/collector.rb
Instance Method Summary collapse
Instance Method Details
#[](key) ⇒ Object
4 5 6 |
# File 'lib/q/collector.rb', line 4 def [] key collected_items[key] ||= fetch_item key end |
#each ⇒ Object
10 11 12 13 14 |
# File 'lib/q/collector.rb', line 10 def each keys.each do |key| yield self[key] end end |
#keys ⇒ Object
7 8 9 |
# File 'lib/q/collector.rb', line 7 def keys @keys ||= fetch_keys end |