module NVD::JSONFeeds::Schema::CPE::HasURI::ClassMethods

Class methods.

Public Instance Methods

from_json(json) click to toggle source

Maps the parsed JSON to a Symbol Hash for {#initialize}.

@param [Hash{String => Object}] json

The parsed JSON.

@return [Hash{Symbol => Object}]

The Symbol Hash.
# File lib/nvd/json_feeds/schema/cpe/has_uri.rb, line 29
def from_json(json)
  {
    cpe23uri: json.fetch('cpe23Uri'),
    cpe22uri: json['cpe22Uri']
  }
end