Class: Tetra::LicenseMapper
- Inherits:
-
Object
- Object
- Tetra::LicenseMapper
- Defined in:
- lib/tetra/license_mapper.rb
Overview
Handles mapping raw license names to SPDX identifiers
Class Method Summary collapse
Class Method Details
.map(raw_name) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/tetra/license_mapper.rb', line 7 def map(raw_name) return "unknown" if raw_name.nil? || raw_name.strip.empty? name = raw_name.strip mapping[name] || name end |
.reset! ⇒ Object
14 15 16 |
# File 'lib/tetra/license_mapper.rb', line 14 def reset! @mapping = nil end |