Class: Licensee::Projects::FSProject
- Defined in:
- lib/licensee/projects/fs_project.rb
Constant Summary
Constants inherited from Project
Instance Attribute Summary
Attributes inherited from Project
#detect_packages, #detect_readme
Instance Method Summary collapse
-
#initialize(path, **args) ⇒ FSProject
constructor
A new instance of FSProject.
Methods inherited from Project
#license, #license_file, #license_files, #licenses, #matched_file, #matched_files, #package_file, #readme_file
Methods included from HashHelper
Constructor Details
#initialize(path, **args) ⇒ FSProject
Returns a new instance of FSProject.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/licensee/projects/fs_project.rb', line 13 def initialize(path, **args) if ::File.file?(path) @pattern = File.basename(path) @dir = File. File.dirname(path) else @pattern = '*' @dir = File.(path) end @root = File.(args.delete(:search_root) || @dir) raise 'Search root must be the project path directory or its ancestor' unless valid_search_root? super(**args) end |