Module: Erubis::ErboutEnhancer

Included in:
ErboutEruby, Eruby, FastEruby
Defined in:
lib/erubis/enhancer.rb

Overview

set buffer variable name to ‘_erbout’ as well as ‘_buf’

this is only for Eruby.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.descObject

:nodoc:



253
254
255
# File 'lib/erubis/enhancer.rb', line 253

def self.desc   # :nodoc:
  "set '_erbout = _buf = \"\";' to be compatible with ERB."
end

Instance Method Details

#add_postamble(src) ⇒ Object



261
262
263
264
# File 'lib/erubis/enhancer.rb', line 261

def add_postamble(src)
  src << "\n" unless src[-1] == ?\n
  src << "_buf.to_s\n"
end

#add_preamble(src) ⇒ Object



257
258
259
# File 'lib/erubis/enhancer.rb', line 257

def add_preamble(src)
  src << "_erbout = _buf = '';"
end