lib/memory.rb
# Converts memory into a hash by frame
#
# @return [Hash] a hash of frame numbers to memory values
Converts memory into a hash by frame
Converts memory into a hash by frame
def to_h
    @data.values
         .each_slice(@frame_size)
         .map.with_index { |e, i| [i, e] }
         .to_h
  end
def to_h @data . values . each_slice ( @frame_size ) . map . with_index { | e , i | [ i , e ] } . to_h end
Converts memory into a hash by frame
Converts memory into a hash by frame
a hash of frame numbers to memory values
a hash of frame numbers to memory values
Hash