class IRB::Notifier::AbstractNotifier
OutputMethod object used by the Notifier.
LeveledNotifier to inherit. It provides several wrapper methods for the
An abstract class, or superclass, for CompositeNotifier and
def exec_if
def exec_if yield(@base_notifier) if notify? end
def initialize(prefix, base_notifier)
def initialize(prefix, base_notifier) @prefix = prefix @base_notifier = base_notifier end
def notify?
A wrapper method used to determine whether notifications are enabled.
def notify? true end
def pp(*objs)
initialization.
Same as #ppx, except it uses the #prefix given during object
def pp(*objs) if notify? @base_notifier.ppx @prefix, *objs end end
def ppx(prefix, *objs)
given during object initialization.
Same as #pp, except it concatenates the given +prefix+ with the #prefix
def ppx(prefix, *objs) if notify? @base_notifier.ppx @prefix+prefix, *objs end end
def print(*opts)
def print(*opts) @base_notifier.print prefix, *opts if notify? end
def printf(format, *opts)
def printf(format, *opts) @base_notifier.printf(prefix + format, *opts) if notify? end
def printn(*opts)
def printn(*opts) @base_notifier.printn prefix, *opts if notify? end
def puts(*objs)
def puts(*objs) if notify? @base_notifier.puts(*objs.collect{|obj| prefix + obj.to_s}) end end