class RuboCop::Cop::Sorbet::CallbackConditionalsBinding

def immediately_enclosing_module_name(node)

Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module.
Find the immediately enclosing class or module name.
def immediately_enclosing_module_name(node)
  (node.parent&.begin_type? ? node.parent.parent : node.parent)&.defined_module_name
end