Forum: Ruby Capturing the Ruby generated by Erb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2009-01-17 22:49
How can one capture the Ruby source file that gets generated from an Erb
template?

Thanks,
Wes
A99870c1391c39da2089649745965bda?d=identicon&s=25 Jean-François Trân (Guest)
on 2009-01-17 23:50
(Received via mailing list)
2009/1/17 Wes Gamble :
> How can one capture the Ruby source file that gets generated
> from an Erb template?

ERB#src

if you've got an erb file, you can use the command line erb (erb -x ...
)

  -- Jean-François.
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2009-01-18 19:01
Many thanks.  That is quite handy.

I did use it to discover that the <% -%> syntax doesn't seem to matter
anymore.  Putting the hyphen before the end tag didn't appear to
suppress the "\n" at the end of the line on which it was used.

Again, thanks,
Wes
This topic is locked and can not be replied to.