Sha256: c831dfca88c58bd700ca780cc4afd5491f81755da99567541c1fcae29566f0f6

Contents?: true

Size: 356 Bytes

Versions: 15

Compression:

Stored size: 356 Bytes

Contents

module Polyfill
  module V2_3
    module Enumerator
      module Lazy
        def grep_v(pattern)
          ::Enumerator::Lazy.new(self) do |yielder, element|
            next if pattern === element # rubocop:disable Style/CaseEquality

            yielder << (block_given? ? yield(element) : element)
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
polyfill-1.9.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.8.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.7.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.6.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.5.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.4.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.3.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.2.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.1.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.0.1 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-1.0.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-0.10.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-0.9.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-0.8.0 lib/polyfill/v2_3/enumerator/lazy.rb
polyfill-0.7.0 lib/polyfill/v2_3/enumerator/lazy.rb