Class: TestQueue::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/test_queue/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid, num) ⇒ Worker

Returns a new instance of Worker.



9
10
11
12
13
14
15
# File 'lib/test_queue/runner.rb', line 9

def initialize(pid, num)
  @pid = pid
  @num = num
  @start_time = Time.now
  @output = ''
  @stats = {}
end

Instance Attribute Details

#end_timeObject

Returns the value of attribute end_time.



7
8
9
# File 'lib/test_queue/runner.rb', line 7

def end_time
  @end_time
end

#hostObject

Returns the value of attribute host.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def host
  @host
end

#numObject

Returns the value of attribute num.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def num
  @num
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def output
  @output
end

#pidObject

Returns the value of attribute pid.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def pid
  @pid
end

#start_timeObject

Returns the value of attribute start_time.



7
8
9
# File 'lib/test_queue/runner.rb', line 7

def start_time
  @start_time
end

#statsObject

Returns the value of attribute stats.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def stats
  @stats
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/test_queue/runner.rb', line 6

def status
  @status
end

Instance Method Details

#linesObject



17
18
19
# File 'lib/test_queue/runner.rb', line 17

def lines
  @output.split("\n")
end