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
god binary status, log, terminate, logging system improvements
[god.git]
/
lib
/
god
/
timeline.rb
blob
2445071dca7061c8d3ea5e3933e7145b01dc7797
1
module God
2
3
class Timeline < Array
4
def initialize(max_size)
5
super()
6
@max_size = max_size
7
end
8
9
def push(val)
10
super(val)
11
shift if size > @max_size
12
end
13
14
def <<(val)
15
push(val)
16
end
17
end
18
19
end