method
do_with_enum
v1_9_2_180 -
Show latest stable
- Class:
Set
do_with_enum(enum, &block)private
No documentation available.
# File lib/set.rb, line 79
def do_with_enum(enum, &block)
if enum.respond_to?(:each_entry)
enum.each_entry(&block)
elsif enum.respond_to?(:each)
enum.each(&block)
else
raise ArgumentError, "value must be enumerable"
end
end