Class: Termplot::Producers::CommandProducer
- Inherits:
-
BaseProducer
- Object
- BaseProducer
- Termplot::Producers::CommandProducer
- Defined in:
- lib/termplot/producers/command_producer.rb
Instance Method Summary collapse
Methods inherited from BaseProducer
Constructor Details
This class inherits a constructor from Termplot::Producers::BaseProducer
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/termplot/producers/command_producer.rb', line 7 def run temp_executable = make_executable(.command) loop do n = `#{temp_executable.path}`.chomp # TODO: Error handling... produce(n) # Interval is in ms sleep(.interval / 1000.0) end ensure temp_executable.unlink end |