extracting to_s from getter and setter
This commit is contained in:
parent
be2b59bd01
commit
ed0900df7f
@ -16,10 +16,6 @@ module Register
|
||||
# end
|
||||
# attr_accessor :array , :index , :register
|
||||
|
||||
def to_s
|
||||
"GetByte: #{array}[#{index}] -> #{register}"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Produce a GetByte instruction.
|
||||
|
@ -20,10 +20,6 @@ module Register
|
||||
# end
|
||||
# attr_accessor :array , :index , :register
|
||||
|
||||
def to_s
|
||||
"GetSlot: #{array}[#{index}] -> #{register}"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Produce a GetSlot instruction.
|
||||
|
@ -29,6 +29,10 @@ module Register
|
||||
end
|
||||
attr_accessor :array , :index , :register
|
||||
|
||||
def to_s
|
||||
"#{self.class.name}: #{array}[#{index}] -> #{register}"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -6,10 +6,6 @@ module Register
|
||||
|
||||
class SetByte < Setter
|
||||
|
||||
def to_s
|
||||
"SetByte: #{register} -> #{array} [#{index}]"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Produce a SetByte instruction.
|
||||
|
@ -20,10 +20,6 @@ module Register
|
||||
# end
|
||||
# attr_accessor :register , :array , :index
|
||||
|
||||
def to_s
|
||||
"SetSlot: #{register} -> #{array} [#{index}]"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Produce a SetSlot instruction.
|
||||
|
@ -27,6 +27,10 @@ module Register
|
||||
end
|
||||
attr_accessor :register , :array , :index
|
||||
|
||||
def to_s
|
||||
"#{self.class.name}: #{array}[#{index}] -> #{register}"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user