On 2014-16-04 21:55, Aaron Stone wrote:
On Wed, Apr 16, 2014 at 11:53 AM, Andy Parker <[email protected]
<mailto:[email protected]>> wrote:
I am considering Joshua's request for the concat function. It would
provide a way to emit text from within the embedded code in the
template, and might help in some situations. But it another case
where it adds a bit of special stuff to do something that that
already be achieved with a little refactoring.
ERB already has a concat function natively with Ruby string syntax.
Given this template:
<%
foo = 'FOO'
arg = '99'
options = 'WHAT'
%>
<%= "#{foo} -d bar #{arg.to_i} -- #{options}" %>
Yields:
FOO -d bar 99 -- WHAT
EPP supports <%= > tags as well which is exactly what a "concatenate
expression result as string" would do.
I can also imagine an epp_concat, that raises an error if called outside
of an epp context, and otherwise does the same as <%= >, but it is
really not required (it is just less noisy).
- henrik
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/lin1k1%24us9%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.