Class: Glimmer::Util::ProcTracker
- Inherits:
-
Proc
- Object
- Proc
- Glimmer::Util::ProcTracker
- Defined in:
- lib/glimmer/util/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.
27 28 29 |
# File 'lib/glimmer/util/proc_tracker.rb', line 27 def initialize(proc) super(proc) end |
Instance Method Details
#call(*args) ⇒ Object
30 31 32 33 |
# File 'lib/glimmer/util/proc_tracker.rb', line 30 def call(*args) __getobj__.call(*args) @called = true end |
#called? ⇒ Boolean
34 35 36 |
# File 'lib/glimmer/util/proc_tracker.rb', line 34 def called? !!@called end |