Similar to Print in ERB without <%=?
However, the answer there is specific to ruby on rails. Is there a similar capability in vanilla erb?
Here's a use case:
<% [
'host_perfdata_command',
'service_perfdata_command',
].each do |var|
value = instance_variable_get("@#{var}")
if value
%><%= "#{var}=#{value}" %><%
end
end
-%>
While this works, it i%><%=s hard to r%><%ead.