Class: CommandTimer::Runner
- Inherits:
-
Object
- Object
- CommandTimer::Runner
- Defined in:
- lib/command_timer/runner.rb
Instance Method Summary collapse
-
#initialize(yml, options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/command_timer/runner.rb', line 10 def start @commands.each_with_index do |command, index| puts "########################################" puts "# Next: Command#{index + 1}" puts "# #{command.description}" if command.description command.echo_command("# ") puts "########################################" if command.burn_time if command.burn_time =~ /^auto$/i command.exec else count_down_and_burn_command(command) end else wait_input_to_continue(command) end end end |