Module: OverSIP::SystemCallbacks
- Extended by:
- Logger
- Defined in:
- lib/oversip/system_callbacks.rb
Overview
This module is intended for 3rd party modules that need custom code to be executed when OverSIP is started, reloaded or terminated.
Class Attribute Summary collapse
-
.on_reload_callbacks ⇒ Object
readonly
Returns the value of attribute on_reload_callbacks.
-
.on_started_callbacks ⇒ Object
readonly
Returns the value of attribute on_started_callbacks.
-
.on_terminated_callbacks ⇒ Object
readonly
Returns the value of attribute on_terminated_callbacks.
Class Method Summary collapse
- .on_reload(pr = nil, &bl) ⇒ Object
- .on_started(pr = nil, &bl) ⇒ Object
- .on_terminated(pr = nil, &bl) ⇒ Object
Methods included from Logger
close, fg_system_msg2str, init_logger_mq, load_methods, log_id, syslog_system_msg2str, syslog_user_msg2str
Class Attribute Details
.on_reload_callbacks ⇒ Object (readonly)
Returns the value of attribute on_reload_callbacks.
15 16 17 |
# File 'lib/oversip/system_callbacks.rb', line 15 def on_reload_callbacks @on_reload_callbacks end |
.on_started_callbacks ⇒ Object (readonly)
Returns the value of attribute on_started_callbacks.
13 14 15 |
# File 'lib/oversip/system_callbacks.rb', line 13 def on_started_callbacks @on_started_callbacks end |
.on_terminated_callbacks ⇒ Object (readonly)
Returns the value of attribute on_terminated_callbacks.
14 15 16 |
# File 'lib/oversip/system_callbacks.rb', line 14 def on_terminated_callbacks @on_terminated_callbacks end |
Class Method Details
.on_reload(pr = nil, &bl) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/oversip/system_callbacks.rb', line 36 def self.on_reload pr=nil, &bl block = pr || bl raise ::ArgumentError, "no block given" unless block.is_a? ::Proc @on_reload_callbacks << block end |
.on_started(pr = nil, &bl) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/oversip/system_callbacks.rb', line 22 def self.on_started pr=nil, &bl block = pr || bl raise ::ArgumentError, "no block given" unless block.is_a? ::Proc @on_started_callbacks << block end |
.on_terminated(pr = nil, &bl) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/oversip/system_callbacks.rb', line 29 def self.on_terminated pr=nil, &bl block = pr || bl raise ::ArgumentError, "no block given" unless block.is_a? ::Proc @on_terminated_callbacks << block end |