Sha256: 4b130f5fd736e08e95274938ef48dc30df82a409b3b16e1c430bbcca42fc759d

Contents?: true

Size: 162 Bytes

Versions: 301

Compression:

Stored size: 162 Bytes

Contents

# frozen_string_literal: true

class Enumerator
  def ongoing?
    !stopped?
  end

  def stopped?
    peek
    false
  rescue ::StopIteration
    true
  end
end

Version data entries

301 entries across 301 versions & 4 rubygems

Version Path
eac_ruby_utils-0.124.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.97.2 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.123.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.121.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.120.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.76.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.76.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.75.2 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.119.2 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.75.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.75.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.119.1 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.74.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.74.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.73.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.119.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.72.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.118.1 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_ruby_utils-0.118.0 lib/eac_ruby_utils/patches/enumerator/stopped.rb
eac_tools-0.70.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/stopped.rb