Class: Glimmer::ProcTracker
- Inherits:
 - 
      Proc
      
        
- Object
 - Proc
 - Glimmer::ProcTracker
 
 
- Defined in:
 - lib/glimmer/proc_tracker.rb
 
Instance Method Summary collapse
- #call(*args) ⇒ Object
 - #called? ⇒ Boolean
 - 
  
    
      #initialize(proc)  ⇒ ProcTracker 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ProcTracker.
 
Constructor Details
#initialize(proc) ⇒ ProcTracker
Returns a new instance of ProcTracker.
      26 27 28  | 
    
      # File 'lib/glimmer/proc_tracker.rb', line 26 def initialize(proc) super(proc) end  | 
  
Instance Method Details
#call(*args) ⇒ Object
      30 31 32 33  | 
    
      # File 'lib/glimmer/proc_tracker.rb', line 30 def call(*args) __getobj__.call(*args) @called = true end  | 
  
#called? ⇒ Boolean
      35 36 37  | 
    
      # File 'lib/glimmer/proc_tracker.rb', line 35 def called? !!@called end  |