Displaying 4 results from an estimated 4 matches for "trim_mod".
Did you mean:
trim_mode
2006 Aug 28
10
Templates and arrays
I''m in the process of documenting templates right now, and I figured
I should see what happens when you use them with arrays:
$ cat ~/bin/test.pp
$values = [this, is, an, array, of, values]
$content = template("/tmp/templates/testing.erb")
file { "/tmp/temtest": content => $content }
$ cat /tmp/templates/testing.erb
<% values.each do |val| %>
I got
2006 Jan 04
7
<% if ... -%> What is this?
I seen some RoR code that went like this:
<% if ...blah, blah... -%>
.. blah, blah
<% end -%>
What are the minus signs for in the if statement? Cannot seem to find
anything about this, and searching on "-" in this context is hard to get
anything meaningfull back.
Thanks,
- Mark
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for
suppressing trailing newlines. Thus
erb -n script
gives errors. Where is Rails ERB so I can invoke it directly?
Thank you
Hugh
2006 Jul 21
0
No subject
If trim_mode is passed a String containing one or more of the following
modifiers, ERB will adjust its code generation as listed:
% enables Ruby code processing for lines beginning with %
<> omit newline for lines starting with <% and ending in %>
> omit newline for lines ending in...