Class: SitePrism::Timer Private
- Inherits:
-
Object
- Object
- SitePrism::Timer
- Defined in:
- lib/site_prism/timer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #wait_time ⇒ Object readonly private
Class Method Summary collapse
- .run(wait_time, &block) ⇒ Object private
Instance Method Summary collapse
- #done? ⇒ Boolean private
-
#initialize(wait_time) ⇒ Timer
constructor
private
A new instance of Timer.
- #run ⇒ Object private
Constructor Details
#initialize(wait_time) ⇒ Timer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Timer.
14 15 16 17 |
# File 'lib/site_prism/timer.rb', line 14 def initialize(wait_time) @wait_time = wait_time @done = false end |
Instance Attribute Details
#wait_time ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/site_prism/timer.rb', line 8 def wait_time @wait_time end |
Class Method Details
.run(wait_time, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/site_prism/timer.rb', line 10 def self.run(wait_time, &block) new(wait_time).run(&block) end |
Instance Method Details
#done? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/site_prism/timer.rb', line 19 def done? @done == true end |
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 |
# File 'lib/site_prism/timer.rb', line 23 def run start yield self ensure stop end |