add source to the to_s

This commit is contained in:
Torsten Ruger
2018-03-22 18:38:19 +02:00
parent 19afc376f4
commit 9932d0bf33
11 changed files with 21 additions and 12 deletions

View File

@ -30,7 +30,7 @@ module Risc
attr_accessor :array , :index , :register
def to_s
"#{self.class.name.split("::").last}: #{array}[#{index}] -> #{register}"
class_source "#{array}[#{index}] -> #{register}"
end
end