Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
ERB: Format for trim_mode string
Farrel Lifson
10/14/2008 9:07:00 AM
In the documentation for ERB.new
(
http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.ht...
)
it says:
"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 %>"
What is the format for this trim_mode string? I specifically want to
use the % and <> modes. I tried passing through "%<>" but it doesn't
seem to be working.
Farrel
--
Aimred - Ruby Development and Consulting
http://www....
1 Answer
Wu Junchen
2/2/2009 12:03:00 PM
0
Farrel Lifson wrote:
> In the documentation for ERB.new
> (
http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.ht...
)
> it says:
>
> "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 %>"
>
> What is the format for this trim_mode string? I specifically want to
> use the % and <> modes. I tried passing through "%<>" but it doesn't
> seem to be working.
>
> Farrel
maybe your <% ruby code %> must start at the beginning of the line,there
mustn't be no more white space.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
ERB: Format for trim_mode string
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password