Class: LightIO::Watchers::Timer
- Defined in:
- lib/lightio/watchers/timer.rb
Instance Attribute Summary collapse
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Attributes inherited from Watcher
Instance Method Summary collapse
-
#initialize(interval) ⇒ Timer
constructor
A new instance of Timer.
- #start(ioloop) ⇒ Object
Methods inherited from Watcher
Constructor Details
#initialize(interval) ⇒ Timer
Returns a new instance of Timer.
7 8 9 |
# File 'lib/lightio/watchers/timer.rb', line 7 def initialize(interval) @interval = interval end |
Instance Attribute Details
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
4 5 6 |
# File 'lib/lightio/watchers/timer.rb', line 4 def interval @interval end |
#uuid ⇒ Object
Returns the value of attribute uuid.
5 6 7 |
# File 'lib/lightio/watchers/timer.rb', line 5 def uuid @uuid end |
Instance Method Details
#start(ioloop) ⇒ Object
11 12 13 |
# File 'lib/lightio/watchers/timer.rb', line 11 def start(ioloop) ioloop.add_timer(self) end |