Class: DAF::DynamicActionDaemon
- Inherits:
-
Object
- Object
- DAF::DynamicActionDaemon
- Defined in:
- lib/daf.rb
Overview
This class represents the Dynamic Action Daemon it requires a set of commands to be passed in
Instance Method Summary collapse
-
#initialize(commands) ⇒ DynamicActionDaemon
constructor
Initializes DAD with a given command set.
-
#start ⇒ Object
Starts the daemon - this method will block for duration of execution of program.
Constructor Details
#initialize(commands) ⇒ DynamicActionDaemon
Initializes DAD with a given command set
39 40 41 |
# File 'lib/daf.rb', line 39 def initialize(commands) @commands = commands end |
Instance Method Details
#start ⇒ Object
Starts the daemon - this method will block for duration of execution of program
45 46 47 48 |
# File 'lib/daf.rb', line 45 def start @commands.each(&:execute) sleep end |