class RuboCop::Cop::Style::Documentation

Constants

YAYOI_MSG

Public Instance Methods

check(node, body, type) click to toggle source
# File lib/rubocop/cop/style/documentation.rb, line 9
def check(node, body, type)
  return if namespace?(body)
  return if documentation_comment?(node) || nodoc_comment?(node)
  return if compact_namespace?(node) &&
            nodoc_comment?(outer_module(node).first)

  add_offense(node,
              location: :keyword,
              message: format(YAYOI_MSG, type: type))
end