class RuboCop::Cop::Rails::DynamicFindBy

def static_method_name(method_name)

If code isn't wrong, returns nil
Returns static method name.
def static_method_name(method_name)
  match = METHOD_PATTERN.match(method_name)
  return nil unless match
  match[2] ? 'find_by!' : 'find_by'
end