Sha256: 1d657914d664f90687760017a61a3f449c2165001b9610f8920959ee2a0f4bda
Contents?: true
Size: 396 Bytes
Versions: 13
Compression:
Stored size: 396 Bytes
Contents
module Nanoc class MutableIdentifiableCollectionView < Nanoc::IdentifiableCollectionView # Deletes every object for which the block evaluates to true. # # @yieldparam [#identifier] object # # @yieldreturn [Boolean] # # @return [self] def delete_if(&_block) @objects = @objects.reject { |o| yield(view_class.new(o, @context)) } self end end end
Version data entries
13 entries across 13 versions & 1 rubygems