Class: Licensee::Project::PackageInfo
- Defined in:
- lib/licensee/project_files/package_info.rb
Instance Attribute Summary
Attributes inherited from File
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from File
#confidence, #initialize, #license, #matcher
Constructor Details
This class inherits a constructor from Licensee::Project::File
Class Method Details
.name_score(filename) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/licensee/project_files/package_info.rb', line 15 def self.name_score(filename) return 1.0 if ::File.extname(filename) == '.gemspec' return 1.0 if filename == 'package.json' return 0.75 if filename == 'bower.json' 0.0 end |
Instance Method Details
#possible_matchers ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/licensee/project_files/package_info.rb', line 4 def possible_matchers case ::File.extname(filename) when '.gemspec' [Matchers::Gemspec] when '.json' [Matchers::NpmBower] else [] end end |