class Inventarium::CLI::TemplateGenerator
Public Instance Methods
call(dir:, payload:)
click to toggle source
# File lib/inventarium/cli/template_generator.rb, line 6 def call(dir:, payload:) template = File.read(template_file_path) result = ERB.new(template).result(binding) File.open(dir, 'w') { |f| f.write(result) } end
Private Instance Methods
template_file_path()
click to toggle source
# File lib/inventarium/cli/template_generator.rb, line 15 def template_file_path File.expand_path(File.dirname(__FILE__) + "/templates/service.yaml.erb") end