Sha256: 6a3245aabcfcd111f3ab8d098e784974a8f6d947f4d71c5df800e7386541597f

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

# frozen_string_literal: true

module Tataru
  module Instructions
    # sets temp result
    class ValueUpdateInstruction < ImmediateModeInstruction
      def run
        unless memory.hash[:update_action].key? @param
          raise "No value set for '#{@param}'"
        end

        memory.hash[:temp] = {
          result: memory.hash[:update_action][@param]
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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