Class: IRuby::Display::FormatMatcher
- Inherits:
-
Object
- Object
- IRuby::Display::FormatMatcher
show all
- Defined in:
- lib/iruby/display.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of FormatMatcher.
201
202
203
|
# File 'lib/iruby/display.rb', line 201
def initialize(&block)
@block = block
end
|
Instance Method Details
#call(obj) ⇒ Object
205
206
207
|
# File 'lib/iruby/display.rb', line 205
def call(obj)
@block.(obj)
end
|
#inspect ⇒ Object
209
210
211
|
# File 'lib/iruby/display.rb', line 209
def inspect
"#{self.class.name}[%p]" % @block
end
|