Changeset 228

Show
Ignore:
Timestamp:
06/11/05 19:38:14 (3 years ago)
Author:
ged
Message:

- Oops. Repeat after me: "Always run tests before checkin." Fixed visibility of

the *_method_added callbacks.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/fm/entity.rb

    r226 r228  
    105105 
    106106 
     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 
    107120    ######### 
    108121    protected 
     
    153166 
    154167 
    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  
    167168end # class FaerieMUD::Entity 
    168169