Module: SourceFinder::PythonSourceFileGlobber

Included in:
SourceFileGlobber
Defined in:
lib/source_finder/langs/python.rb

Overview

Globber for Python

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#extra_python_files_arrObject



11
12
13
# File 'lib/source_finder/langs/python.rb', line 11

def extra_python_files_arr
  @extra_python_files_arr ||= []
end

#python_dirs_arrObject



7
8
9
# File 'lib/source_finder/langs/python.rb', line 7

def python_dirs_arr
  @python_dirs_arr ||= %w(src tests)
end

#python_file_extensions_arrObject



15
16
17
18
# File 'lib/source_finder/langs/python.rb', line 15

def python_file_extensions_arr
  arr = @python_file_extensions_arr if defined? @python_file_extensions_arr
  make_extensions_arr(arr, %w(py))
end

Instance Method Details

#python_file_extensions_globObject



20
21
22
# File 'lib/source_finder/langs/python.rb', line 20

def python_file_extensions_glob
  python_file_extensions_arr.join(',')
end

#python_files_arrObject



29
30
31
# File 'lib/source_finder/langs/python.rb', line 29

def python_files_arr
  exclude_garbage(@globber.glob(python_files_glob) - exclude_files_arr)
end

#python_files_globObject



24
25
26
27
# File 'lib/source_finder/langs/python.rb', line 24

def python_files_glob
  make_files_glob(extra_python_files_arr, python_dirs_arr,
                  python_file_extensions_glob)
end