Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 368 Bytes
# Recent handles the 'most-recent' list by logging to a file and keeping a 10-item array.
#
class Recent
def initialize
@@people = []
@@hits = 0
end
def push(person)
@@hits += 1
@@people << person
@@people.uniq!
Twifter::LOG.info person.inspect
@@people.shift if @@people.size > 10
end
def to_a
@@people.reverse
end
end