class GovukSchemas::Example

def self.find(schema_name, example_name:)

Returns:
  • (Hash) - the example content item

Parameters:
  • example_name (String) -- the name of the example JSON file
  • schema_name (String) -- like "detailed_guide", "policy" or "publication"
def self.find(schema_name, example_name:)
  json = File.read("#{examples_path(schema_name)}/#{example_name}.json")
  JSON.parse(json)
end