rubyx/lib/register/instructions/operator_instruction.rb

19 lines
329 B
Ruby
Raw Normal View History

2015-08-04 21:01:20 +02:00
module Register
class OperatorInstruction < Instruction
def initialize source , operator , left , right
super(source)
@operator = operator
@left = left
@right = right
end
attr_reader :left , :right
def to_s
"OperatorInstruction: #{left} #{operator} #{right}"
end
end
end