class GovukSchemas::Example
def self.examples_path(schema_name)
-
(String)
- the path to use for examples
Parameters:
-
schema_name
(String
) -- like "detailed_guide", "policy" or "publication"
def self.examples_path(schema_name) examples_dir = "#{GovukSchemas.content_schema_dir}/examples" if Dir.exist?(examples_dir) "#{examples_dir}/#{schema_name}/frontend" else "#{GovukSchemas.content_schema_dir}/formats/#{schema_name}/frontend/examples" end end