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.6.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.6.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.5.4 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.5.3 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.5.2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.5.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.5.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.7 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.6 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.5 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.4 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.3 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.2 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.1 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.4.0 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.8 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.7 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.6 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.5 lib/nanoc/base/views/mutable_identifiable_collection_view.rb
nanoc-4.3.4 lib/nanoc/base/views/mutable_identifiable_collection_view.rb