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_STRICT =
"{#{CANDIDATE_FILE_NAMES.join(',')}}*"
- CANDIDATE_PATH_WILDCARD =
"*#{CANDIDATE_PATH_WILDCARD_STRICT}"
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.
15 16 17 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 15 def initialize(install_path) @install_path = install_path ? Pathname(install_path) : nil end |
Class Method Details
.find(install_path, options = {}) ⇒ Object
11 12 13 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 11 def self.find(install_path, = {}) new(install_path).find() end |
Instance Method Details
#find(options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/license_finder/package_utils/notice_files.rb', line 19 def find( = {}) paths_of_candidate_files .map { |path| PossibleLicenseFile.new(path, ) } # Not really possible license files, but that class has all we need. end |