Class: Blinkenstein::Runner
- Inherits:
-
Object
- Object
- Blinkenstein::Runner
- Includes:
- Logging, Celluloid
- Defined in:
- lib/blinkenstein/runner.rb
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #refresh_all ⇒ Object
- #register_all ⇒ Object
Methods included from Logging
#debug, #error, #fatal, #info, #warn
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
9 10 11 12 13 14 15 16 |
# File 'lib/blinkenstein/runner.rb', line 9 def initialize register_all refresh_all every(15) do refresh_all end end |
Instance Method Details
#finalize ⇒ Object
30 31 32 33 34 35 |
# File 'lib/blinkenstein/runner.rb', line 30 def finalize info "Shutting down. Turning off the lights..." Blink1.open do |blink1| blink1.off end end |
#refresh_all ⇒ Object
25 26 27 28 |
# File 'lib/blinkenstein/runner.rb', line 25 def refresh_all debug "Refreshing all monitors" @monitors.each(&:refresh) end |