Class: IRB::Notifier::CompositeNotifier
- Inherits:
-
AbstractNotifier
- Object
- AbstractNotifier
- IRB::Notifier::CompositeNotifier
- Defined in:
- lib/irb/notifier.rb
Instance Attribute Summary collapse
-
#level_notifier ⇒ Object
(also: #level)
Returns the value of attribute level_notifier.
-
#notifiers ⇒ Object
readonly
Returns the value of attribute notifiers.
Attributes inherited from AbstractNotifier
Instance Method Summary collapse
- #def_notifier(level, prefix = "") ⇒ Object
-
#initialize(prefix, base_notifier) ⇒ CompositeNotifier
constructor
A new instance of CompositeNotifier.
Methods inherited from AbstractNotifier
#exec_if, #notify?, #pp, #ppx, #print, #printf, #printn, #puts
Constructor Details
#initialize(prefix, base_notifier) ⇒ CompositeNotifier
Returns a new instance of CompositeNotifier.
76 77 78 79 80 81 |
# File 'lib/irb/notifier.rb', line 76 def initialize(prefix, base_notifier) super @notifiers = [D_NOMSG] @level_notifier = D_NOMSG end |
Instance Attribute Details
#level_notifier ⇒ Object Also known as: level
Returns the value of attribute level_notifier
91 92 93 |
# File 'lib/irb/notifier.rb', line 91 def level_notifier @level_notifier end |
#notifiers ⇒ Object (readonly)
Returns the value of attribute notifiers
83 84 85 |
# File 'lib/irb/notifier.rb', line 83 def notifiers @notifiers end |
Instance Method Details
#def_notifier(level, prefix = "") ⇒ Object
85 86 87 88 89 |
# File 'lib/irb/notifier.rb', line 85 def def_notifier(level, prefix = "") notifier = LeveledNotifier.new(self, level, prefix) @notifiers[level] = notifier notifier end |