class LicenseScout::License::Record
A class that represents the components that make up a license.
Attributes
content[R]
id[R]
parsed_expression[R]
source[R]
spdx_license_data[R]
Public Class Methods
new(license_id = nil, source = nil, content = nil, options = {})
click to toggle source
# File lib/license_scout/license.rb, line 30 def initialize(license_id = nil, source = nil, content = nil, options = {}) @id = LicenseScout::SPDX.find(license_id, options[:force]) @parsed_expression = LicenseScout::SPDX.parse(id) @source = source @content = content end
Public Instance Methods
to_h()
click to toggle source
# File lib/license_scout/license.rb, line 37 def to_h { id: id, source: source, content: content, } end