12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/kuber_kit/service_reader/reader.rb', line 12
def read(shell, service)
if service.template_name.nil?
raise AttributeNotSetError, "Please set template for service using #template method"
end
template = template_store.get(service.template_name)
context_helper = context_helper_factory.build_service_context(shell, service)
template = reader.read(shell, template)
result = text_preprocessor.compile(template, context_helper: context_helper)
result
end
|