class Enumerator
Public Instance Methods
current(default_value = nil)
click to toggle source
# File lib/eac_ruby_utils/patches/enumerator/current.rb, line 4 def current(default_value = nil) peek rescue ::StopIteration default_value end
ongoing?()
click to toggle source
# File lib/eac_ruby_utils/patches/enumerator/stopped.rb, line 4 def ongoing? !stopped? end
stopped?()
click to toggle source
# File lib/eac_ruby_utils/patches/enumerator/stopped.rb, line 8 def stopped? peek false rescue ::StopIteration true end