blob: bd26b6a377391bb6b4d4ad214dc61ba8d8e0bb96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# $Id$
require 'ripper/filter'
class CommentStripper < Ripper::Filter
def CommentStripper.strip(src)
new(src).parse(nil)
end
def on_default(event, token, data)
print token
end
def on_comment(token, data)
puts
end
end
CommentStripper.strip(ARGF)
|