Method: ComputeUnit::Device#rom_data

Defined in:
lib/compute_unit/device.rb

#rom_dataString::IO

Returns - the contents of the rom file.

Returns:

  • (String::IO)
    • the contents of the rom file



61
62
63
64
65
66
67
68
69
70
# File 'lib/compute_unit/device.rb', line 61

def rom_data
  return unless File.exist?(rom_path)

  begin
    unlock_rom
    IO.read(rom_path, mode: 'rb')
  ensure
    lock_rom
  end
end