class Lookbook::Preview

def require_preview_files

def require_preview_files
  reset_files_data
  preview_files.each do |file|
    require_dependency(file[:path])
    @loaded_files.push(file[:rel_path])
  rescue => exception
    Rails.logger.error "[lookbook] preview error\n#{exception.full_message}\n"
    @errors.push(Lookbook::Error.new(exception, {
      title: "Preview #{exception.class}",
      file_name: file[:rel_path],
      file_path: file[:path]
    }))
  end
end