123456789_123456789_123456789_123456789_123456789_

Class: IRB::Notifier::NoMsgNotifier

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
self, LeveledNotifier, Comparable, AbstractNotifier
Inherits: IRB::Notifier::LeveledNotifier
Defined in: lib/irb/notifier.rb

Overview

NoMsgNotifier is a LeveledNotifier that's used as the default notifier when creating a new CompositeNotifier.

This notifier is used as the zero index, or level 0, for CompositeNotifier#notifiers, and will not output messages of any sort.

Class Method Summary

LeveledNotifier - Inherited

.new

Create a new leveled notifier with the given base, and prefix to send to AbstractNotifier.new

AbstractNotifier - Inherited

.new

Creates a new ::IRB::Notifier object.

Instance Attribute Summary

LeveledNotifier - Inherited

#level

The current level of this notifier object.

#notify?

Whether to output messages to the output method, depending on the level of this notifier object.

AbstractNotifier - Inherited

#notify?

A wrapper method used to determine whether notifications are enabled.

#prefix

The prefix for this ::IRB::Notifier, which is appended to all objects being inspected during output.

Instance Method Summary

LeveledNotifier - Inherited

#<=>

Compares the level of this notifier object with the given other notifier.

AbstractNotifier - Inherited

#exec_if

Execute the given block if notifications are enabled.

#pp

Same as #ppx, except it uses the #prefix given during object initialization.

#ppx

Same as #pp, except it concatenates the given prefix with the #prefix given during object initialization.

#print

See OutputMethod#print for more detail.

#printf

See OutputMethod#printf for more detail.

#printn

See OutputMethod#printn for more detail.

#puts

See OutputMethod#puts for more detail.

Constructor Details

.newNoMsgNotifier

Creates a new notifier that should not be used to output messages.

[ GitHub ]

  
# File 'lib/irb/notifier.rb', line 217

def initialize
  @base_notifier = nil
  @level = 0
  @prefix = ""
end

Instance Attribute Details

#notify?Boolean (readonly)

Ensures notifications are ignored, see AbstractNotifier#notify? for more information.

[ GitHub ]

  
# File 'lib/irb/notifier.rb', line 225

def notify?
  false
end