Class: HotCell::Fixtures::Reverse

Inherits:
Operation
  • Object
show all
Defined in:
lib/hot_cell/test_operations.rb

Overview

An operation that reads what a caller gave it without a copy onto scratch: it never asks for a path, which is what an operation reading only a container header wants rather than a multi-gigabyte copy.

Constant Summary

Constants inherited from Operation

Operation::READ_BYTES

Instance Method Summary collapse

Methods inherited from Operation

abstract_operation, abstract_operation?, before_fork, before_worker_boot, inherited, limits, operation, operation_name, #run_tool, unreadable

Instance Method Details

#perform(inputs, outputs) ⇒ Object



112
113
114
115
116
# File 'lib/hot_cell/test_operations.rb', line 112

def perform(inputs, outputs)
  outputs.first.to_io.write inputs.first.to_io.read.reverse

  { copied: inputs.first.staged? }
end