module Sigsurv
Constants
- SYMBOLS
- VERSION
Public Class Methods
analyze(directory)
click to toggle source
# File lib/sigsurv.rb, line 5 def self.analyze(directory) Dir["#{directory}/**/*\.rb"].map do |file_path| contents = IO.read(file_path) regex = Regexp.new(SYMBOLS.keys.map{|k| "\\b#{k}\\b"}.join("|")) [file_path, contents.scan(regex).map{|x| SYMBOLS[x.to_sym]}.join] end end