Module: IRB::Notifier
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Exceptions:
| |
Defined in: | lib/irb/notifier.rb |
Overview
An output formatter used internally by the lexer.
Constant Summary
-
D_NOMSG =
Internal use only
# File 'lib/irb/notifier.rb', line 228NoMsgNotifier.new
Class Method Summary
-
.def_notifier(prefix = "", output_method = StdioOutputMethod.new)
mod_func
Define a new
Notifier
output source, returning a newCompositeNotifier
with the givenprefix
andoutput_method
.
Class Method Details
.def_notifier(prefix = "", output_method = StdioOutputMethod.new) (mod_func)
Define a new Notifier
output source, returning a new Notifier::CompositeNotifier
with the given prefix
and output_method
.
The optional prefix
will be appended to all objects being inspected during output, using the given output_method
as the output source. If no output_method
is given, StdioOutputMethod
will be used, and all expressions will be sent directly to STDOUT without any additional formatting.
# File 'lib/irb/notifier.rb', line 31
def def_notifier(prefix = "", output_method = StdioOutputMethod.new) CompositeNotifier.new(prefix, output_method) end