Created
October 31, 2017 13:43
-
-
Save WhatsARanjit/3886664938245f3d99a70b7ac5fdeaf7 to your computer and use it in GitHub Desktop.
ERB to EPP
This file contains hidden or 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
[root@node ~]# ./pepper.rb template.erb | |
<%- | String $str_foo, | |
Array $list, | |
Hash $dict, | |
Array $list_2, | |
Hash $list_3, | |
| -%> | |
My IP is <%= $str_foo %>. | |
<% $list.each |$val| { -%> | |
Value: <%= $val %> | |
<% } -%> | |
<% $dict.each |$k,$v| { -%> | |
<%= $k %>: <%= $v %> | |
<% } -%> | |
The first value is <%= $list_2[0] %>. | |
The 'last' value is <%= $list_3['last'] %>. |
This file contains hidden or 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
My IP is <%= @str_foo %>. | |
<% @list.each do |val| -%> | |
Value: <%= val %> | |
<% end -%> | |
<% @dict.each do |k,v| -%> | |
<%= k %>: <%= v %> | |
<% end -%> | |
The first value is <%= @list_2[0] %>. | |
The 'last' value is <%= @list_3['last'] %>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternate ending?