Class: ScanApp

Inherits:
Object
  • Object
show all
Defined in:
lib/scan_app.rb

Constant Summary collapse

EXCLUDE_FOLDERS =
['db/', 'spec/', 'config/']
ALLOWED_EXTENSIONS =
['.rb']

Class Method Summary collapse

Class Method Details

.call(path, except, only) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/scan_app.rb', line 6

def call(path, except, only)
  @except = except
  @only = only
  # list of all files from app dir recursively
  @project_files = Dir.glob("#{path}/**/*")

  filter_by_extension
  exclude_default

  exclude_files if @except
  include_only_files if @only
  @project_files
end