Module: Sigsurv

Defined in:
lib/sigsurv.rb,
lib/sigsurv/version.rb

Constant Summary collapse

SYMBOLS =
%w(module class def do end)
VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.analyze(directory) ⇒ Object



5
6
7
8
9
10
# File 'lib/sigsurv.rb', line 5

def self.analyze(directory)
  Dir["#{directory}/**/*rb"].map do |file_path|
    contents = IO.read(file_path)
    [file_path, contents.scan(/#{SYMBOLS.join("|")}/).map{|x| x.split(//).first}.join]
  end
end