Sha256: 6fc504732dbb57b69be1483ba08175d4ced3154eb84dcbf09769f8267f70aef5
Contents?: true
Size: 536 Bytes
Versions: 72
Compression:
Stored size: 536 Bytes
Contents
# require "eitil_support/directory" module EitilSupport module Directory class << self def contents(directory='app') Dir[File.join(directory, '**', '*')] end def files(directory='app') contents(directory).select { |file| File.file?(file) } end def subdirs(directory='app') contents(directory).select { |file| File.directory?(file) } end def lines(directory='app') files(directory).map { |file| File.open(file).count }.sum end end end end
Version data entries
72 entries across 72 versions & 1 rubygems