Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: eRB <%=
Gavin Kistner
9/14/2006 4:31:00 AM
From: Rob Sanheim [mailto:rsanheim@gmail.com]
> One thing I've often wondered is how do you output from w/i a "non
> output" block...ie in java scriptlets these are equivalent:
>
> <% out.println("hi") %>
> <%= "hi" %>
>
> With ERB I've had some (admittedly rare) cases where this would be
> useful. Is it possible?
As others have noted, you can concatenate to the _erbout string variable.
You can also name this variable whatever you like (4th param to the ERB initializer).
You can also patch ERB so that print/puts/p all do what you might expect:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: eRB <%=
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