class Ossy::CLI::Templates::Compile
Public Instance Methods
call(source_path:, target_path:, data_file:)
click to toggle source
# File lib/ossy/cli/templates/compile.rb, line 34 def call(source_path:, target_path:, data_file:) puts "Compiling #{source_path} => #{target_path}" data = YAML.load_file(data_file) template = Tilt.new(source_path) output = template.render(Context.new(data)) File.write(target_path, output) end