Module: NVD::JSONFeeds::Schema::HasDataVersion::ClassMethods
- Defined in:
- lib/nvd/json_feeds/schema/has_data_version.rb
Overview
The class methods.
Instance Method Summary collapse
-
#from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to a Symbol Hash for #initialize.
Instance Method Details
#from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to a Symbol Hash for NVD::JSONFeeds::Schema::HasDataVersion#initialize.
30 31 32 33 34 |
# File 'lib/nvd/json_feeds/schema/has_data_version.rb', line 30 def from_json(json) { data_version: DATA_VERSIONS.fetch(json.fetch('CVE_data_version')) } end |