Module: CVESchema::CVE::HasLangValue
- Included in:
- Configuration, Credit, Description, Exploit, Solution, Timeline, WorkAround
- Defined in:
- lib/cve_schema/cve/has_lang_value.rb
Overview
Mixins for JSON objects containing "lang"
and "value"
keys.
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#lang ⇒ :en, ...
readonly
Language identifier for #value.
-
#value ⇒ String
readonly
Text value.
Class Method Summary collapse
-
.included(base) ⇒ Object
Adds ClassMethods to the class.
Instance Method Summary collapse
- #initialize(lang:, value:) ⇒ Object
-
#to_s ⇒ String
Converts the object to a String.
Instance Attribute Details
#lang ⇒ :en, ... (readonly)
Language identifier for #value.
62 63 64 |
# File 'lib/cve_schema/cve/has_lang_value.rb', line 62 def lang @lang end |
#value ⇒ String (readonly)
Text value.
67 68 69 |
# File 'lib/cve_schema/cve/has_lang_value.rb', line 67 def value @value end |
Class Method Details
.included(base) ⇒ Object
Adds ClassMethods to the class.
16 17 18 |
# File 'lib/cve_schema/cve/has_lang_value.rb', line 16 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#initialize(lang:, value:) ⇒ Object
76 77 78 79 |
# File 'lib/cve_schema/cve/has_lang_value.rb', line 76 def initialize(lang: , value: ) @lang = lang @value = value end |
#to_s ⇒ String
Converts the object to a String.
87 88 89 |
# File 'lib/cve_schema/cve/has_lang_value.rb', line 87 def to_s @value end |