module CVESchema::CVE::HasLangValue

Mixins for JSON objects containing `“lang”` and `“value”` keys.

Attributes

lang[R]

Language identifier for {#value}.

@return [:en, :es, String]

value[R]

Text value.

@return [String]

Public Class Methods

included(base) click to toggle source

Adds {ClassMethods} to the class.

@param [Class] base

The class including {HasLangValue}.
# File lib/cve_schema/cve/has_lang_value.rb, line 16
def self.included(base)
  base.extend ClassMethods
end
new(lang: , value: ) click to toggle source

Initializes {#lang} and {#value}.

@param [:en, :es, String] lang

@param [String] value

# File lib/cve_schema/cve/has_lang_value.rb, line 76
def initialize(lang: , value: )
  @lang  = lang
  @value = value
end

Public Instance Methods

to_s() click to toggle source

Converts the object to a String.

@return [String]

Returns the {#value}.
# File lib/cve_schema/cve/has_lang_value.rb, line 87
def to_s
  @value
end