Sha256: 527b41e97a9d99b166918f087f3370d35b3d4976bd50867dbc7862f27c00cc8c
Contents?: true
Size: 415 Bytes
Versions: 2
Compression:
Stored size: 415 Bytes
Contents
require 'find' module BigFiles # Finds source code files in the current directory class SourceCodeFinder def initialize(filefind: Find) @filefind = filefind end def find files = [] @filefind.find('.') do |path| files << path if path =~ /.*\.rb$/ || path =~ /.*\.swift$/ end files.map do |filename| filename.sub(/^.\//, '') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bigfiles-0.0.2 | lib/bigfiles/source_code_finder.rb |
bigfiles-0.0.1 | lib/bigfiles/source_code_finder.rb |