Class: Module

Inherits:
Object show all
Defined in:
lib/a2z/blank_slate.rb

Overview

Also, modules included into Object need to be scanned and have their instance methods removed from blank slate. In theory, modules included into Kernel would have to be removed as well, but a “feature” of Ruby prevents late includes into modules from being exposed in the first place.

Instance Method Summary collapse

Instance Method Details

#append_features(mod) ⇒ Object



102
103
104
105
106
107
108
109
# File 'lib/a2z/blank_slate.rb', line 102

def append_features(mod)
  result = blankslate_original_append_features(mod)
  return result if mod != Object
  instance_methods.each do |name|
    BlankSlate.hide(name)
  end
  result
end

#blankslate_original_append_featuresObject



101
# File 'lib/a2z/blank_slate.rb', line 101

alias blankslate_original_append_features append_features