extracting to_s from getter and setter

This commit is contained in:
Torsten Ruger 2016-12-16 00:30:26 +02:00
parent be2b59bd01
commit ed0900df7f
6 changed files with 8 additions and 16 deletions

View File

@ -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.

View File

@ -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.

View File

@ -29,6 +29,10 @@ module Register
end
attr_accessor :array , :index , :register
def to_s
"#{self.class.name}: #{array}[#{index}] -> #{register}"
end
end
end

View File

@ -6,10 +6,6 @@ module Register
class SetByte < Setter
def to_s
"SetByte: #{register} -> #{array} [#{index}]"
end
end
# Produce a SetByte instruction.

View File

@ -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.

View File

@ -27,6 +27,10 @@ module Register
end
attr_accessor :register , :array , :index
def to_s
"#{self.class.name}: #{array}[#{index}] -> #{register}"
end
end
end