Created
October 20, 2017 13:51
-
-
Save alastairhm/1c488889ebd5db63839ff7da1d4c9ab3 to your computer and use it in GitHub Desktop.
Ruby ERB inline templating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'erb' | |
service = "localhost.local" | |
node = "localhost" | |
port = "port" | |
#simple_template = "<%= node %>:<%= port %>" | |
simple_template = "<%= service %>" | |
output = ERB.new(simple_template).result() | |
puts output | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment