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

Execute the given block if notifications are enabled.
def exec_if
  yield(@base_notifier) if notify?
end

def initialize(prefix, base_notifier)

Creates a new Notifier object
def initialize(prefix, base_notifier)
  @prefix = prefix
  @base_notifier = base_notifier
end

def notify?

Defaults to +true+.

A wrapper method used to determine whether notifications are enabled.
def notify?
  true
end

def pp(*objs)

See OutputMethod#ppx for more detail.
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)

See OutputMethod#ppx for more detail.

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)

See OutputMethod#print for more detail.
def print(*opts)
  @base_notifier.print prefix, *opts if notify?
end

def printf(format, *opts)

See OutputMethod#printf for more detail.
def printf(format, *opts)
  @base_notifier.printf(prefix + format, *opts) if notify?
end

def printn(*opts)

See OutputMethod#printn for more detail.
def printn(*opts)
  @base_notifier.printn prefix, *opts if notify?
end

def puts(*objs)

See OutputMethod#puts for more detail.
def puts(*objs)
  if notify?
    @base_notifier.puts(*objs.collect{|obj| prefix + obj.to_s})
  end
end