Tuesday, February 26, 2019

Super Easy Ruby ERB template


#!/opt/chef-workstation/embedded/bin/ruby -w

 

require 'erb'

 

#template = File.read('./mytemplate.txt.erb')

 

template = 'i want to put stuff ===> <%= "here" %> <==='

 

obj_out = ERB.new(template)

 

STDOUT.puts obj_out.result

No comments:

Post a Comment