Module: PDK::Template::Renderer::V1

Defined in:
lib/pdk/template/renderer/v1.rb,
lib/pdk/template/renderer/v1/renderer.rb,
lib/pdk/template/renderer/v1/template_file.rb,
lib/pdk/template/renderer/v1/legacy_template_dir.rb

Defined Under Namespace

Classes: LegacyTemplateDir, Renderer, TemplateFile

Class Method Summary collapse

Class Method Details

.compatible?(template_root, _context) ⇒ Boolean

Whether the template directory and context are valid for the V1 renderer

Returns:

  • (Boolean)

See Also:



13
14
15
# File 'lib/pdk/template/renderer/v1.rb', line 13

def self.compatible?(template_root, _context)
  ['moduleroot', 'moduleroot_init'].all? { |dir| PDK::Util::Filesystem.directory?(File.join(template_root, dir)) }
end

.instance(template_root, template_uri, context) ⇒ Object

Creates an instance of the V1 Renderer



19
20
21
# File 'lib/pdk/template/renderer/v1.rb', line 19

def self.instance(template_root, template_uri, context)
  PDK::Template::Renderer::V1::Renderer.new(template_root, template_uri, context)
end