1 5 package net.sourceforge.pmd.cpd; 6 7 import java.io.File ; 8 import java.io.FilenameFilter ; 9 10 public class RubyLanguage implements Language { 11 12 public static class RubyFileOrDirectoryFilter implements FilenameFilter { 13 public boolean accept(File dir, String filename) { 14 return filename.endsWith("rb") || filename.endsWith("cgi") || 15 filename.endsWith("class") || 16 (new File (dir.getAbsolutePath() + fileSeparator + filename).isDirectory()); 17 } 18 } 19 20 public Tokenizer getTokenizer() { 21 return new RubyTokenizer(); 22 } 23 24 public FilenameFilter getFileFilter() { 25 return new RubyFileOrDirectoryFilter(); 26 } 27 } 28 | Popular Tags |