Module: NVD::JSONFeeds::Schema::CPE::HasURI

Included in:
Match, Name
Defined in:
lib/nvd/json_feeds/schema/cpe/has_uri.rb

Overview

Adds the #cpe23uri and #cpe22uri attributes.

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cpe22uriString? (readonly)

The CPE 2.2 URI.

Returns:

  • (String, nil)


61
62
63
# File 'lib/nvd/json_feeds/schema/cpe/has_uri.rb', line 61

def cpe22uri
  @cpe22uri
end

#cpe23uriString (readonly) Also known as: cpe_uri

The CPE 2.3 URI.

Returns:

  • (String)


54
55
56
# File 'lib/nvd/json_feeds/schema/cpe/has_uri.rb', line 54

def cpe23uri
  @cpe23uri
end

Class Method Details

.included(base) ⇒ Object

Extends ClassMethods.



12
13
14
# File 'lib/nvd/json_feeds/schema/cpe/has_uri.rb', line 12

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

Instance Method Details

#initialize(cpe23uri:, cpe22uri: nil) ⇒ Object

Initializes the CPE URIs.

Parameters:

  • cpe23uri (String)

    The CPE 2.3 URI.

  • cpe22uri (String) (defaults to: nil)

    The CPE 2.2 URI.



46
47
48
49
# File 'lib/nvd/json_feeds/schema/cpe/has_uri.rb', line 46

def initialize(cpe23uri: , cpe22uri: nil)
  @cpe23uri = cpe23uri
  @cpe22uri = cpe22uri
end