Class: ForemanGitTemplates::Renderer::Source::Repository
- Inherits:
-
Foreman::Renderer::Source::Base
- Object
- Foreman::Renderer::Source::Base
- ForemanGitTemplates::Renderer::Source::Repository
- Defined in:
- app/lib/foreman_git_templates/renderer/source/repository.rb
Instance Method Summary collapse
- #content ⇒ Object
- #find_snippet(name) ⇒ Object
-
#initialize(template, repository_path) ⇒ Repository
constructor
A new instance of Repository.
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
#content ⇒ Object
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 |