Class: HotCell::Fixtures::Mojibake

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

Overview

A result carrying bytes a tool produced, which is where invalid UTF-8 comes from in practice.

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



374
375
376
# File 'lib/hot_cell/test_operations.rb', line 374

def perform(_inputs, _outputs)
  { filename: "caf\xFF.jpg".dup.force_encoding(Encoding::UTF_8) }
end