Method: Sequel::Plugins::StaticCache::ClassMethods#all
- Defined in:
- lib/sequel/plugins/static_cache.rb
permalink #all(&block) ⇒ Object
An array of all of the model’s instances, without issuing a database query. If a block is given, yields each instance to the block.
80 81 82 83 84 |
# File 'lib/sequel/plugins/static_cache.rb', line 80 def all(&block) array = @static_cache_frozen ? @all.dup : to_a array.each(&block) if block array end |