Class: Smith::Tool::ExecutionTracker
- Inherits:
-
Object
- Object
- Smith::Tool::ExecutionTracker
- Defined in:
- lib/smith/tool/execution_tracker.rb
Instance Method Summary collapse
-
#initialize ⇒ ExecutionTracker
constructor
A new instance of ExecutionTracker.
- #mark_started! ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize ⇒ ExecutionTracker
Returns a new instance of ExecutionTracker.
6 7 8 9 |
# File 'lib/smith/tool/execution_tracker.rb', line 6 def initialize @started = false @mutex = Mutex.new end |
Instance Method Details
#mark_started! ⇒ Object
11 12 13 |
# File 'lib/smith/tool/execution_tracker.rb', line 11 def mark_started! @mutex.synchronize { @started = true } end |
#started? ⇒ Boolean
15 16 17 |
# File 'lib/smith/tool/execution_tracker.rb', line 15 def started? @mutex.synchronize { @started } end |