module RuboCop::AST::MethodIdentifierPredicates

def enumerator_method?

Returns:
  • (Boolean) - whether the method is an enumerator
def enumerator_method?
  ENUMERATOR_METHODS.include?(method_name) ||
    method_name.to_s.start_with?('each_')
end