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:



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

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

Instance Method Details

#add_postamble(src) ⇒ Object



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

def add_postamble(src)
  src << "\n" unless src[-1] == ?\n
  src << "#{@bufvar}.to_s\n"
end

#add_preamble(src) ⇒ Object



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

def add_preamble(src)
  src << "_erbout = #{@bufvar} = '';"
end