Class: LicenseFinder::NoticeFiles
- Inherits:
-
Object
- Object
- LicenseFinder::NoticeFiles
- Defined in:
- lib/license_finder/package_utils/notice_files.rb
Constant Summary collapse
- CANDIDATE_FILE_NAMES =
%w[NOTICE Notice].freeze
- CANDIDATE_PATH_WILDCARD =
"*{#{CANDIDATE_FILE_NAMES.join(',')}}*"
Class Method Summary collapse
Instance Method Summary collapse
- #find(options = {}) ⇒ Object
-
#initialize(install_path) ⇒ NoticeFiles
constructor
A new instance of NoticeFiles.
Constructor Details
#initialize(install_path) ⇒ NoticeFiles
Returns a new instance of NoticeFiles.
14 15 16 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 14 def initialize(install_path) @install_path = install_path ? Pathname(install_path) : nil end |
Class Method Details
.find(install_path, options = {}) ⇒ Object
10 11 12 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 10 def self.find(install_path, = {}) new(install_path).find() end |
Instance Method Details
#find(options = {}) ⇒ Object
18 19 20 21 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 18 def find( = {}) paths_of_candidate_files .map { |path| PossibleLicenseFile.new(path, ) } # Not really possible license files, but that class has all we need. end |