Class: ForemanGitTemplates::Renderer::Source::Repository

Inherits:
Foreman::Renderer::Source::Base
  • Object
show all
Defined in:
app/lib/foreman_git_templates/renderer/source/repository.rb

Instance Method Summary collapse

Constructor Details

#initialize(template, repository_path) ⇒ Repository

Returns a new instance of Repository.



7
8
9
10
# File 'app/lib/foreman_git_templates/renderer/source/repository.rb', line 7

def initialize(template, repository_path)
  @template = template
  @repository_path = repository_path
end

Instance Method Details

#contentObject



12
13
14
# File 'app/lib/foreman_git_templates/renderer/source/repository.rb', line 12

def content
  @content ||= ForemanGitTemplates::RepositoryReader.call(repository_path, template_path)
end

#find_snippet(name) ⇒ Object



16
17
18
# File 'app/lib/foreman_git_templates/renderer/source/repository.rb', line 16

def find_snippet(name)
  SnippetRepositoryTemplate.new(name: name)
end