0
0
Fork 0

Drop entries in storage, if more than new length

This commit is contained in:
Stormwind 2015-04-25 15:48:45 +02:00
parent 26d09a71fd
commit 01c1f97750
1 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,14 @@ module Rubella
def length= length
@length = length
# TODO drop entries, if more than new length
# Drop entries, if more than new length
if @length.kind_of? Integer
while @data.length > @length
@data.pop
end
end
@length
end
# Adds the data from the given storage to the own data and return this as a