Module: Packet::Core::ClassMethods
- Includes:
- Packet::ClassHelpers
- Defined in:
- lib/packet/packet_core.rb
Instance Method Summary collapse
- #after_connection(p_method) ⇒ Object
-
#after_unbind(p_method) ⇒ Object
FIXME: following callbacks hasn’t been tested and not usable.
- #before_unbind(p_method) ⇒ Object
Methods included from Packet::ClassHelpers
iattr_accessor, inheritable_attribute, metaclass
Instance Method Details
#after_connection(p_method) ⇒ Object
19 20 21 22 |
# File 'lib/packet/packet_core.rb', line 19 def after_connection p_method connection_callbacks[:after_connection] ||= [] connection_callbacks[:after_connection] << p_method end |
#after_unbind(p_method) ⇒ Object
FIXME: following callbacks hasn’t been tested and not usable.
25 26 27 28 |
# File 'lib/packet/packet_core.rb', line 25 def after_unbind p_method connection_callbacks[:after_unbind] ||= [] connection_callbacks[:after_unbind] << p_method end |
#before_unbind(p_method) ⇒ Object
30 31 32 33 |
# File 'lib/packet/packet_core.rb', line 30 def before_unbind p_method connection_callbacks[:before_unbind] ||= [] connection_callbacks[:before_unbind] << p_method end |