Sha256: 39160f7f70b891fe56a5b14dc23b1991a53d09d198066542821f6f1adf9ec520
Contents?: true
Size: 777 Bytes
Versions: 66
Compression:
Stored size: 777 Bytes
Contents
class KuberKit::ServiceReader::Reader include KuberKit::Import[ "core.template_store", "core.context_helper_factory", "template_reader.reader", "preprocessing.text_preprocessor" ] AttributeNotSetError = Class.new(KuberKit::Error) Contract KuberKit::Shell::AbstractShell, KuberKit::Core::Service => Any 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 end
Version data entries
66 entries across 66 versions & 1 rubygems