def lc(dir,exts=[".rb",".rbw"])
total = 0
Find.find(dir) do |f|
Finde.prune if f == ".metadata"
if exts.include?(File.extname(f))
lines = File.open(f).read.count("\n")
puts "#{f} #{lines}"
total += lines
end
end
puts "total: #{total}"
return total
end
大概5000行~高一下半学期到现在