class RuboCop::AST::HashNode

def each_pair

Returns:
  • (Enumerator) - if no block is given
  • (self) - if a block is given

Other tags:
    Note: - `kwsplat` nodes are ignored.
def each_pair
  return each_child_node(:pair).to_enum unless block_given?
  each_child_node(:pair) do |pair|
    yield(*pair)
  end
  self
end