class RuboCop::Cop::Lint::UselessAccessModifier

def any_method_definition?(child)

def any_method_definition?(child)
  cop_config.fetch('MethodCreatingMethods', []).any? do |m|
    matcher_name = "#{m}_method?".to_sym
    unless respond_to?(matcher_name)
      self.class.def_node_matcher matcher_name, <<-PATTERN
        {def (send nil? :#{m} ...)}
      PATTERN
    end
    send(matcher_name, child)
  end
end