Class: RDoc::ERBPartial

Inherits:
ERB show all
Defined in:
lib/rdoc/erb_partial.rb

Overview

Allows an ERB template to be rendered in the context (binding) of an existing ERB template evaluation.

Constant Summary

Constants inherited from ERB

ERB::Revision

Instance Attribute Summary

Attributes inherited from ERB

#encoding, #filename, #lineno, #src

Instance Method Summary collapse

Methods inherited from ERB

#def_class, #def_method, #def_module, #initialize, #location=, #make_compiler, #result, #result_with_hash, #run, version

Constructor Details

This class inherits a constructor from ERB

Instance Method Details

#set_eoutvar(compiler, eoutvar = '_erbout') ⇒ Object

Overrides compiler startup to set the eoutvar to an empty string only if it isn’t already set.



12
13
14
15
16
# File 'lib/rdoc/erb_partial.rb', line 12

def set_eoutvar compiler, eoutvar = '_erbout'
  super

  compiler.pre_cmd = ["#{eoutvar} ||= +''"]
end