class IRuby::Display::TypeFormatMatcher
Public Class Methods
Source
# File lib/iruby/display.rb, line 228 def initialize(class_block) super() do |obj| begin self.klass === obj # We have to rescue all exceptions since constant autoloading could fail with a different error rescue Exception false end end @class_block = class_block end
Calls superclass method
IRuby::Display::FormatMatcher::new
Public Instance Methods
Source
# File lib/iruby/display.rb, line 244 def inspect klass = begin @class_block.() rescue Exception @class_block end "#{self.class.name}[%p]" % klass end