Module: TestBench::Output::Buffer::Record

Defined in:
lib/test_bench/output/buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batch_dataObject

Returns the value of attribute batch_data.



93
94
95
# File 'lib/test_bench/output/buffer.rb', line 93

def batch_data
  @batch_data
end

Instance Method Details

#finish_batch(result) ⇒ Object



108
109
110
# File 'lib/test_bench/output/buffer.rb', line 108

def finish_batch(result)
  batch_data.result = result
end

#forward(raw_output) ⇒ Object



95
96
97
98
99
# File 'lib/test_bench/output/buffer.rb', line 95

def forward(raw_output)
  return super if batch_data.nil?

  raw_output.public_send(signal, *data, batch_data: batch_data)
end

#start_batch(depth) ⇒ Object



101
102
103
104
105
106
# File 'lib/test_bench/output/buffer.rb', line 101

def start_batch(depth)
  batch_data = Output::BatchData.new
  batch_data.depth = depth

  self.batch_data = batch_data
end