Sha256: b3bac48c9680de4f13d93a5de48abdb77141a0637c3f449993c65b9d102d30e0

Contents?: true

Size: 145 Bytes

Versions: 301

Compression:

Stored size: 145 Bytes

Contents

# frozen_string_literal: true

class Enumerator
  def current(default_value = nil)
    peek
  rescue ::StopIteration
    default_value
  end
end

Version data entries

301 entries across 301 versions & 4 rubygems

Version Path
eac_tools-0.61.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.60.3 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.60.2 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.60.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.60.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.59.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.58.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.57.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.56.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.56.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.7 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.6 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.5 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.4 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.3 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.2 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_ruby_utils-0.112.0 lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.1 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb
eac_ruby_utils-0.111.0 lib/eac_ruby_utils/patches/enumerator/current.rb
eac_tools-0.55.0 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator/current.rb