method

do_with_enum

v2_4_6 - Show latest stable - Class: Set
do_with_enum(enum, &block)
private

No documentation available.

# File lib/set.rb, line 112
  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