Skip to content

Instantly share code, notes, and snippets.

@MachinesAreUs
Created August 20, 2012 04:42
Show Gist options
  • Save MachinesAreUs/3401025 to your computer and use it in GitHub Desktop.
Save MachinesAreUs/3401025 to your computer and use it in GitHub Desktop.
Simple example to generate a batch process from ruby
require 'erb'
template = ERB.new <<-EOF
This is a greeting to <%= name %>.
EOF
File.readlines('names.txt').each do |line|
name = line.chomp
puts template.result(binding)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment