Class: IRB::Notifier::CompositeNotifier

Inherits:
AbstractNotifier show all
Defined in:
lib/irb/notifier.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractNotifier

#prefix

Instance Method Summary collapse

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_notifierObject 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

#notifiersObject (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