Method: DynamicContent.structure_file

Defined in:
lib/dynamic_content.rb

.structure_fileObject



29
30
31
32
33
34
35
# File 'lib/dynamic_content.rb', line 29

def self.structure_file
  if File.exists? Rails.root.join(self.structure_path)
    return YAML.load(File.read(Rails.root.join(self.structure_path)))
  else
    raise NoStructureFileError, "File #{self.structure_path} is not found."
  end
end