Help needed with this ERB code

F

Frank Church

Is there any code in this ERB snippet that causes text after the EOF
to be included in the template.

Unless my understanding of ERB is inadequate there has to be some bug in it.
It has me at my wit's end.

=============

template = ERB.new <<-EOF

# rsync push mode

#rsync_push_command check

# <%= rsync_push_command %>

# rsync_forced_command
# <%= rsync_forced_command %>
#

EOF

some program code here

=====
After execution the text "some program code here" appears in the
template's output

Are there some circumstances under which ERB goes haywire?

Is there an alternate syntax to the ERB.NEW <<-EOF ... EOF syntax for
when the text is on multiple lines. - Frank
 
F

Frank Church

Is there any code in this ERB snippet that causes text after the EOF
to be included in the template.

Unless my understanding of ERB is inadequate there has to be some bug in it.
It has me at my wit's end.

=============

template = ERB.new <<-EOF

# rsync push mode

#rsync_push_command check

# <%= rsync_push_command %>

# rsync_forced_command
# <%= rsync_forced_command %>
#

EOF

some program code here

=====
After execution the text "some program code here" appears in the
template's output

Are there some circumstances under which ERB goes haywire?

Is there an alternate syntax to the ERB.NEW <<-EOF ... EOF syntax for
when the text is on multiple lines. - Frank


Is there some way the ERB internal stack or whatever can be reset
between calls to ensure that there is nothing left in there to cause
errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top