Class: IRB::Notifier::CompositeNotifier

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

Instance Attribute Summary collapse

Attributes inherited from AbstructNotifier

#prefix

Instance Method Summary collapse

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

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