Class: IRB::Notifier::CompositeNotifier
- Inherits:
-
AbstructNotifier
- Object
- AbstructNotifier
- 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 AbstructNotifier
Instance Method Summary collapse
- #def_notifier(level, prefix = "")) ⇒ Object
-
#initialize(prefix, base_notifier) ⇒ CompositeNotifier
constructor
A new instance of CompositeNotifier.
Methods inherited from AbstructNotifier
#exec_if, #notify?, #pp, #ppx, #print, #printf, #printn, #puts
Constructor Details
#initialize(prefix, base_notifier) ⇒ CompositeNotifier
Returns a new instance of CompositeNotifier.
77 78 79 80 81 82 |
# File 'lib/irb/notifier.rb', line 77 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
92 93 94 |
# File 'lib/irb/notifier.rb', line 92 def level_notifier @level_notifier end |
#notifiers ⇒ Object (readonly)
Returns the value of attribute notifiers
84 85 86 |
# File 'lib/irb/notifier.rb', line 84 def notifiers @notifiers end |
Instance Method Details
#def_notifier(level, prefix = "")) ⇒ Object
86 87 88 89 90 |
# File 'lib/irb/notifier.rb', line 86 def def_notifier(level, prefix = "") notifier = LeveledNotifier.new(self, level, prefix) @notifiers[level] = notifier notifier end |