Class: Pomme::Cli
- Inherits:
-
Thor
- Object
- Thor
- Pomme::Cli
- Defined in:
- lib/pomme/cli.rb
Instance Method Summary collapse
Instance Method Details
#poll ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/pomme/cli.rb', line 17 def poll loop do task = load_task 30.times do print_status(task) sleep 1 end end end |
#start(task) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/pomme/cli.rb', line 4 def start(task) dump = Marshal.dump({ start: Time.now, name: task }) File.open(pomme_path, 'w') do |f| f.write(dump) end end |
#status ⇒ Object
12 13 14 |
# File 'lib/pomme/cli.rb', line 12 def status print_status(load_task) end |