Method: TCOMethod::Mixin#tco_module_method

Defined in:
lib/tco_method/mixin.rb

#tco_module_method(method_name) ⇒ Symbol Also known as: tco_class_method

Module or Class annotation causing the class or module method identified by the given method name to be reevaluated with tail call optimization enabled. Only works for methods defined using the ‘def` keyword.

Parameters:

  • method_name (String, Symbol)

    The name of the class or module method that should be reeevaluated with tail call optimization enabled.

Returns:

  • (Symbol)

    The symbolized method name.

See Also:



17
18
19
# File 'lib/tco_method/mixin.rb', line 17

def tco_module_method(method_name)
  MethodReevaluator.new(self, method_name, :module)
end