Class: CentralNotifications::Registration
- Inherits:
-
Object
- Object
- CentralNotifications::Registration
- Defined in:
- lib/registration.rb
Constant Summary collapse
- NOTIFIER_CLASS_VARIABLE =
:@@_____notifier
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#method ⇒ Object
Returns the value of attribute method.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
- #fork ⇒ Object
-
#initialize(args = {}) ⇒ Registration
constructor
A new instance of Registration.
Constructor Details
#initialize(args = {}) ⇒ Registration
Returns a new instance of Registration.
6 7 8 |
# File 'lib/registration.rb', line 6 def initialize(args={}) @notifier = args[:notifier] end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
4 5 6 |
# File 'lib/registration.rb', line 4 def klass @klass end |
#method ⇒ Object
Returns the value of attribute method.
4 5 6 |
# File 'lib/registration.rb', line 4 def method @method end |
#result ⇒ Object
Returns the value of attribute result.
4 5 6 |
# File 'lib/registration.rb', line 4 def result @result end |
Instance Method Details
#fork ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/registration.rb', line 10 def fork @real_klass = singleton_method? ? (class << klass; self end) : klass @original_alias_symbol = original_alias_symbol return if already_registered? set_notifier_in_notifier_class redefine_orinal_method end |