method

do_with_enum

Importance_0
do_with_enum(enum, &block) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/set.rb, line 122
  def do_with_enum(enum, &block) # :nodoc:
    if enum.respond_to?(:each_entry)
      enum.each_entry(&block) if block
    elsif enum.respond_to?(:each)
      enum.each(&block) if block
    else
      raise ArgumentError, "value must be enumerable"
    end
  end
Register or log in to add new notes.