Sha256: 48c98aa5d4f89827a05a702f5a3a580cabe03684b9707f0236ab86590b55e723

Contents?: true

Size: 388 Bytes

Versions: 41

Compression:

Stored size: 388 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.delete_if { |o| yield(view_class.new(o, @context)) }
      self
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
nanoc-4.3.3 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.4 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.3 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.6 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.2.0b1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.5 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.4 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.3 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.0rc2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.0rc1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.1.0b1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb