Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2025-03-05 09:13:50 +00:00
parent ffbcfe8ea9
commit 73f2bf11f6
42 changed files with 1307 additions and 202 deletions

View File

@ -0,0 +1,30 @@
# frozen_string_literal: true
require_relative 'helper'
module Tooling
module DastVariables
module Docs
class Renderer
include Tooling::DastVariables::Docs::Helper
attr_reader :schema
def initialize(output_file:, template:)
@output_file = output_file
@template = template
@layout = Haml::Engine.new(File.read(template))
end
def contents
# Render and remove an extra trailing new line
@contents ||= @layout.render(self).sub!(/\n(?=\Z)/, '')
end
def write
File.write(@output_file, contents)
end
end
end
end
end