# Class: YARD::Handlers::Ruby::ModuleFunctionHandler

Inherits:
  Base
  - Object
  - Handlers::Base
  - Base
  - YARD::Handlers::Ruby::ModuleFunctionHandler
  show all

Includes:
  DecoratorHandlerMethods

Defined in:
  lib/yard/handlers/ruby/module_function_handler.rb

## Overview

Handles module_function calls to turn methods into public class methods. Also creates a private instance copy of the method.

## Instance Method Summary collapse

- #make_module_function(instance_method, namespace) ⇒ Object

### Methods included from DecoratorHandlerMethods

#process_decorator

### Methods included from Parser::Ruby

#s

## Instance Method Details

### #make_module_function(instance_method, namespace) ⇒ `Object`

    34
    35
    36
    37
    38

    # File 'lib/yard/handlers/ruby/module_function_handler.rb', line 34

    def make_module_function(instance_method, namespace)
      class_method = MethodObject.new(namespace, instance_method.name, :module)
      instance_method.copy_to(class_method)
      class_method.visibility = :public
    end