Module: Kernel

Defined in:
lib/capistrano/configuration/namespaces.rb

Class Method Summary collapse

Class Method Details

.method_added(name) ⇒ Object

Detect method additions to Kernel and remove them in the Namespace class



210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/capistrano/configuration/namespaces.rb', line 210

def method_added(name)
  result = method_added_without_capistrano(name)
  return result if self != Kernel

  namespace = Capistrano::Configuration::Namespaces::Namespace

  if namespace.method_defined?(name) && namespace.instance_method(name).owner == Kernel
    namespace.send :undef_method, name
  end

  result
end

.method_added_without_capistranoObject



207
# File 'lib/capistrano/configuration/namespaces.rb', line 207

alias_method :method_added_without_capistrano, :method_added