Method: TCOMethod::Mixin#tco_method

Defined in:
lib/tco_method/mixin.rb

#tco_method(method_name) ⇒ Symbol

Class annotation causing the instance 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 instance method that should be reeevaluated with tail call optimization enabled.

Returns:

  • (Symbol)

    The symbolized method name.

See Also:



42
43
44
# File 'lib/tco_method/mixin.rb', line 42

def tco_method(method_name)
  MethodReevaluator.new(self, method_name, :instance)
end