to_s for parfait list

This commit is contained in:
Torsten Ruger
2019-02-17 18:16:19 +02:00
parent e430701645
commit 0ebb8e31c6
3 changed files with 14 additions and 2 deletions

View File

@ -20,7 +20,7 @@ module Parfait
super
self.indexed_length = 0
end
def data_length
self.class.data_length
end
@ -253,6 +253,15 @@ module Parfait
list
end
def to_s
res = "["
each do |item|
res = res + item.to_s
res = res + " ,"
end
res = res + " ]"
return res
end
def to_a
array = []
index = 0