Method: Sequel::Plugins::SubsetStaticCache::CachedDatasetMethods#all
- Defined in:
- lib/sequel/plugins/subset_static_cache.rb
#all(&block) ⇒ Object
An array of all of the dataset’s instances, without issuing a database query. If a block is given, yields each instance to the block.
130 131 132 133 134 135 136 |
# File 'lib/sequel/plugins/subset_static_cache.rb', line 130 def all(&block) return super unless all = @cache[:subset_static_cache_all] array = all.dup array.each(&block) if block array end |