1##
2# Allows an ERB template to be rendered in the context (binding) of an
3# existing ERB template evaluation.
4
5class RDoc::ERBPartial < ERB
6
7  ##
8  # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only
9  # if it isn't already set.
10
11  def set_eoutvar compiler, eoutvar = '_erbout'
12    super
13
14    compiler.pre_cmd = ["#{eoutvar} ||= ''"]
15  end
16
17end
18
19