Class: Walkon::Daemon
- Inherits:
-
Object
- Object
- Walkon::Daemon
- Defined in:
- lib/walkon/daemon.rb
Instance Attribute Summary collapse
-
#devices ⇒ Object
Returns the value of attribute devices.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Daemon
constructor
A new instance of Daemon.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Daemon
Returns a new instance of Daemon.
16 17 18 |
# File 'lib/walkon/daemon.rb', line 16 def initialize @devices = [] end |
Instance Attribute Details
#devices ⇒ Object
Returns the value of attribute devices.
14 15 16 |
# File 'lib/walkon/daemon.rb', line 14 def devices @devices end |
Class Method Details
.start ⇒ Object
20 21 22 |
# File 'lib/walkon/daemon.rb', line 20 def self.start new.run end |
Instance Method Details
#run ⇒ Object
24 25 26 |
# File 'lib/walkon/daemon.rb', line 24 def run loop { check_for_devices } end |