class RuboCop::Cop::Lint::UselessAccessModifier
def any_context_creating_methods?(child)
def any_context_creating_methods?(child) cop_config.fetch('ContextCreatingMethods', []).any? do |m| matcher_name = "#{m}_block?".to_sym unless respond_to?(matcher_name) self.class.def_node_matcher matcher_name, <<~PATTERN ({block numblock} (send {nil? const} {:#{m}} ...) ...) PATTERN end public_send(matcher_name, child) end end