Module: NVD::JSONFeeds::Schema::HasDataVersion

Included in:
CVEFeed, Configurations
Defined in:
lib/nvd/json_feeds/schema/has_data_version.rb

Overview

Adds the #data_version attribute.

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

DATA_VERSIONS =
{'4.0' => :"4.0"}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_version:"4.0", String (readonly)

The data version.

Returns:

  • (:"4.0", String)


40
41
42
# File 'lib/nvd/json_feeds/schema/has_data_version.rb', line 40

def data_version
  @data_version
end

Class Method Details

.included(base) ⇒ Object

Extends ClassMethods.



13
14
15
# File 'lib/nvd/json_feeds/schema/has_data_version.rb', line 13

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#initialize(data_version:) ⇒ Object

Initializes the data version.

Parameters:

  • data_version (:"4.0", String)

    The data version.



48
49
50
# File 'lib/nvd/json_feeds/schema/has_data_version.rb', line 48

def initialize(data_version: )
  @data_version = data_version
end