Method: Set#each

Defined in:
lib/set.rb

#each(&block) ⇒ Object

Calls the given block once for each element in the set, passing the element as parameter. Returns an enumerator if no block is given.



502
503
504
505
506
# File 'lib/set.rb', line 502

def each(&block)
  block_given? or return enum_for(__method__) { size }
  @hash.each_key(&block)
  self
end