repo.or.cz
/
god.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
added MemoryUsage and factored out ProcessCondition
[god.git]
/
lib
/
god
/
conditions
/
timeline.rb
blob
1459dcbe05654a9d7b395432ed9b23326eb349fe
1
module God
2
module Conditions
3
4
class Timeline < Array
5
def initialize(max_size)
6
super()
7
@max_size = max_size
8
end
9
10
def push(val)
11
unshift(val)
12
pop if size > @max_size
13
end
14
end
15
16
end
17
end