class Gemterms::License
An actual license in the system. For example an MIT License
, or BSD 3-Clause License
.
Attributes
classified[R]
code[R]
compatible[R]
name[R]
unknown[RW]
unknown?[RW]
uri[R]
Public Class Methods
new(code, data)
click to toggle source
# File lib/gemterms/license.rb, line 12 def initialize(code, data) @code = code || "Unknown" @name = data.delete("name") @uri = data.delete("uri") @classified = [] @compatible = [] @unknown = false end
Public Instance Methods
inspect()
click to toggle source
# File lib/gemterms/license.rb, line 22 def inspect "#<License code=#{code} name='#{name}' uri=#{uri} compat_count=#{@compatible.length}>" end
mark_classified(*args)
click to toggle source
# File lib/gemterms/license.rb, line 26 def mark_classified(*args) @classified << args end
mark_compatible(*args)
click to toggle source
license, fer, warning = false
# File lib/gemterms/license.rb, line 31 def mark_compatible(*args) @compatible << args end
to_s()
click to toggle source
# File lib/gemterms/license.rb, line 35 def to_s "#{name} [#{code}]" end