Class: ThreadWatcher::ThreadFormatter
- Inherits:
-
Object
- Object
- ThreadWatcher::ThreadFormatter
- Defined in:
- lib/thread_watcher/thread_formatter.rb
Class Method Summary collapse
Class Method Details
.data(thread) ⇒ Object
7 8 9 |
# File 'lib/thread_watcher/thread_formatter.rb', line 7 def self.data thread self.output "|#{thread.id}\t|#{thread.alive?}\t\t|\t#{thread.runtime}\t\t|#{thread.[:name]}" end |
.headline ⇒ Object
3 4 5 |
# File 'lib/thread_watcher/thread_formatter.rb', line 3 def self.headline self.output "|ID\t\t|Running?\t|Runtime in Seconds\t|Name" end |
.output(content) ⇒ Object
11 12 13 |
# File 'lib/thread_watcher/thread_formatter.rb', line 11 def self.output content puts content end |