lib/spandx/spdx/license.rb in spandx-0.12.3 vs lib/spandx/spdx/license.rb in spandx-0.13.0
- old
+ new
@@ -59,33 +59,23 @@
def reference_number=(value)
attributes[:referenceNumber] = value
end
- def content
- @content ||= ::Spandx::Core::Content.new(raw_content)
- end
-
- def content=(value)
- @content = ::Spandx::Core::Content.new(value)
- end
-
def <=>(other)
id <=> other.id
end
def to_s
id
end
- def self.unknown(text)
- new(licenseId: 'Nonstandard', name: 'Unknown').tap { |x| x.content = text }
+ def inspect
+ "#<Spandx::Spdx::License id='#{id}'>"
end
- private
-
- def raw_content
- @raw_content ||= (Spandx.git[:spdx].read("text/#{id}.txt") || '')
+ def self.unknown(text)
+ new(licenseId: 'Nonstandard', name: text)
end
end
end
end