Sha256: b5e0e3f6f9da7221184aea1f556e691e5d5bd5b4cf4b94803f2c6400e6fc5a72
Contents?: true
Size: 450 Bytes
Versions: 24
Compression:
Stored size: 450 Bytes
Contents
class Module def focus *wanteds wanteds.map! { |m| m.to_s } unwanteds = public_instance_methods(false).grep(/test_/) - wanteds unwanteds.each do |unwanted| remove_method unwanted end end def blur parent = self.superclass ObjectSpace.each_object Class do |klass| next unless parent > klass next if klass == self klass.send :focus klass.send :undef_method, :default_test end end end
Version data entries
24 entries across 24 versions & 4 rubygems