Class: YARD::Handlers::Ruby::ModuleFunctionHandler
- 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
Methods included from DecoratorHandlerMethods
Methods included from Parser::Ruby
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 |