module RuneRb::System::Patches::SetRefinements

Refinements made to the Set class of the ruby Core module.

Public Instance Methods

each_consume() { |item| ... } click to toggle source

Consumes elements as they're passed to execution block. @param _ [Proc] the execution block

# File deployment/app/system/patches/set.rb, line 6
def each_consume(&_)
  raise 'Nil block passed to Set#each_consume.' unless block_given?

  each do |item|
    yield(item)
    delete(item)
  end
end