Class: ComplianceEngine::DataLoader::Json

Inherits:
File show all
Defined in:
lib/compliance_engine/data_loader/json.rb

Overview

Load compliance engine data from a JSON file

Instance Attribute Summary

Attributes inherited from File

#key, #mtime, #size

Attributes inherited from ComplianceEngine::DataLoader

#data

Instance Method Summary collapse

Methods inherited from File

#initialize, #refresh

Methods inherited from ComplianceEngine::DataLoader

#initialize, #key

Constructor Details

This class inherits a constructor from ComplianceEngine::DataLoader::File

Instance Method Details

#parse(content) ⇒ Hash

Parse JSON content into a Hash

Parameters:

  • content (String)

    The content to parse

Returns:

  • (Hash)


14
15
16
# File 'lib/compliance_engine/data_loader/json.rb', line 14

def parse(content)
  JSON.parse(content)
end