vendor/bundle/ruby/2.6.0/gems/rubocop-ast-1.18.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb
def def_modifier(node = self)
        arg = node.children[2]

        return unless node.send_type? && node.receiver.nil? && arg.is_a?(::AST::Node)

        return arg if arg.def_type? || arg.defs_type?

        def_modifier(arg)
      end
# Checks if this node is part of a chain of `def` or `defs` modifiers.
#
# @example
#
#   private def foo; end
#
# @return [Node | nil] returns the `def|defs` node this is a modifier for,
# or `nil` if it isn't a def modifier
Checks if this node is part of a chain of `def` or `defs` modifiers.
Checks if this node is part of a chain of ` def ` or ` defs ` modifiers .
def def_modifier(node = self)
        arg = node.children[2]
        return unless node.send_type? && node.receiver.nil? && arg.is_a?(::AST::Node)
        return arg if arg.def_type? || arg.defs_type?
        def_modifier(arg)
      end
def def_modifier ( node = self ) arg = node . children [ 2 ] return unless node . send_type? && node . receiver . nil? && arg . is_a? ( :: AST :: Node ) return arg if arg . def_type? || arg . defs_type? def_modifier ( arg ) end
Checks if this node is part of a chain of `def` or `defs` modifiers.
Checks if this node is part of a chain of ` def ` or ` defs ` modifiers .
returns the `def|defs` node this is a modifier for, or `nil` if it isn't a def modifier
returns the ` def|defs ` node this is a modifier for or ` nil ` if it isn ' t a def modifier
Node | nil
node
example
private def foo; end
private def foo ; end