Sha256: 9b411c69bb1e16db9b7fbcc0140ab0e98c02f7cb93ddd9b663dd322fb09ba0dd
Contents?: true
Size: 617 Bytes
Versions: 7
Compression:
Stored size: 617 Bytes
Contents
module InlineTemplates class BlankObject < BasicObject include ::Kernel def self.make_blank(*keep) old_verbose = $VERBOSE begin $VERBOSE = nil drop_methods [ :!, :!=, :==, :__id__, :__send__, :equal?, :instance_eval, :instance_exec ], keep drop_methods ::Kernel.instance_methods, keep drop_methods ::Kernel.private_instance_methods, keep ensure $VERBOSE = old_verbose end end def self.drop_methods(methods, keep) methods.each do |name| next if keep.include? name undef_method name end end end end
Version data entries
7 entries across 7 versions & 1 rubygems