| | 107 | ### Callback invoked whenever a singleton method is added to the |
| | 108 | ### receiver. Clears the event handler lookup cache if the method being |
| | 109 | ### added contains the word 'handle'. Also aliased to |
| | 110 | ### #singleton_method_removed and #singleton_method_undefined. |
| | 111 | def singleton_method_added( sym ) |
| | 112 | debugMsg( 3, "Flushing event handler lookup cache" ) |
| | 113 | @eventHandlerCache.clear if /handler/ =~ sym.to_s |
| | 114 | super |
| | 115 | end |
| | 116 | alias_method :singleton_method_removed, :singleton_method_added |
| | 117 | alias_method :singleton_method_undefined, :singleton_method_added |
| | 118 | |
| | 119 | |
| 155 | | ### Callback invoked whenever a singleton method is added to the |
| 156 | | ### receiver. Clears the event handler lookup cache if the method being |
| 157 | | ### added contains the word 'handle'. Also aliased to |
| 158 | | ### #singleton_method_removed and #singleton_method_undefined. |
| 159 | | def singleton_method_added( sym ) |
| 160 | | debugMsg( 3, "Flushing event handler lookup cache" ) |
| 161 | | @eventHandlerCache.clear if /handler/ =~ sym.to_s |
| 162 | | super |
| 163 | | end |
| 164 | | alias_method :singleton_method_removed, :singleton_method_added |
| 165 | | alias_method :singleton_method_undefined, :singleton_method_added |
| 166 | | |