class RuboCop::Cop::Style::NonNilCheck

def on_def(node)

def on_def(node)
  body = node.body
  return unless node.predicate_method? && body
  if body.begin_type?
    ignore_node(body.children.last)
  else
    ignore_node(body)
  end
end