class RuboCop::Cop::ThreadSafety::ClassInstanceVariable
def in_def_class_methods_module?(node)
def in_def_class_methods_module?(node) defn = node.ancestors.find do |ancestor| break if new_lexical_scope?(ancestor) ancestor.def_type? end return false unless defn mod = defn.ancestors.find do |ancestor| %i[class module].include?(ancestor.type) end return false unless mod class_methods_module?(mod) end