Sha256: efb737182870ae7c19d121506162a45ee690e1da2d538c8f5c76ada80c4bb28a

Contents?: true

Size: 649 Bytes

Versions: 1

Compression:

Stored size: 649 Bytes

Contents

# frozen_string_literal: true

module Tataru
  module Instructions
    # instruction to initialize the memory
    class InitInstruction < Instruction
      attr_accessor :remote_ids, :outputs, :rom, :labels, :deleted

      def initialize
        @remote_ids = {}
        @outputs = {}
        @rom = {}
        @labels = {}
        @deleted = []
      end

      def run
        memory.hash[:remote_ids] = @remote_ids
        memory.hash[:outputs] = @outputs
        memory.hash[:labels] = @labels
        memory.hash[:rom] = @rom.freeze
        memory.hash[:deleted] = @deleted
        memory.hash[:update_action] = {}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tataru-0.2.0 lib/tataru/instructions/init_instruction.rb