Module: Servus::Support::Lockdown::PrivateCall Private

Defined in:
lib/servus/support/lockdown.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Extended onto every Base subclass. Privatizes any instance-level ‘#call` as soon as it is defined, provided lockdown is enabled in config at definition time.

Instance Method Summary collapse

Instance Method Details

#method_added(name) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • name (Symbol)

    the name of the newly added method



69
70
71
72
73
74
# File 'lib/servus/support/lockdown.rb', line 69

def method_added(name)
  super
  return unless Servus.config.lockdown_enabled

  private :call if name == :call && public_method_defined?(:call)
end