lib/docrb/lib/docrb/ruby_parser.rb
def handle_module_function(parent, _name, target)
      case target.try?(:type)
      when :def
        # This will not be ideal, but let's parse the def as a def (duh), then
        # apply the same logic of :sym here. This is as not ideal as the impl.
        # of parse_module_modifier itself.
        parse_def(target, parent)
        change_method_kind(of: target.children.first, to: :sdef, on: parent)
      when :sym
        # This moves the target from `def` to `sdef`...
        change_method_kind(of: target.children.first, to: :sdef, on: parent)
      when :string
        change_method_kind(of: target.children.first.to_sym, to: :sdef, on: parent)
      end
    end
# Handles a `module_function` call and either registers and modifies a
# function definition following it, or attempts to change previously-defined
# functions visibility based on the call arguments.
#
# parent - The object on which the function has as its receiver
# _name  - Unused.
# target - Target object being passed to the function
Handles a `module_function` call and either registers and modifies a
function definition following it, or attempts to change previously-defined
functions visibility based on the call arguments.

The object on which the function has as its receiver
_name  - Unused.
target - Target object being passed to the function
Handles a ` module_function ` call and either registers and modifies a function definition following it or attempts to change previously - defined functions visibility based on the call arguments . The object on which the function has as its receiver _name - Unused . target - Target object being passed to the function
def handle_module_function(parent, _name, target)
      case target.try?(:type)
      when :def
        parse_def(target, parent)
        change_method_kind(of: target.children.first, to: :sdef, on: parent)
      when :sym
        change_method_kind(of: target.children.first, to: :sdef, on: parent)
      when :string
        change_method_kind(of: target.children.first.to_sym, to: :sdef, on: parent)
      end
    end
def handle_module_function ( parent , _name , target ) case target . try? ( :type ) when :def parse_def ( target , parent ) change_method_kind ( of : target . children . first , to : :sdef , on : parent ) when :sym change_method_kind ( of : target . children . first , to : :sdef , on : parent ) when :string change_method_kind ( of : target . children . first . to_sym , to : :sdef , on : parent ) end end
Handles a `module_function` call and either registers and modifies a
function definition following it, or attempts to change previously-defined
functions visibility based on the call arguments.
Handles a ` module_function ` call and either registers and modifies a function definition following it or attempts to change previously - defined functions visibility based on the call arguments .
# This will not be ideal, but let's parse the def as a def (duh), then # apply the same logic of :sym here. This is as not ideal as the impl. # of parse_module_modifier itself. # This moves the target from `def` to `sdef`...
parent
_name
target