Module: Erubis::ArrayBufferEnhancer

Included in:
ArrayBufferEruby
Defined in:
lib/erubis/enhancer.rb

Overview

use an Array object as buffer (included in Eruby by default)

this is only for Eruby.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.descObject

:nodoc:



183
184
185
# File 'lib/erubis/enhancer.rb', line 183

def self.desc   # :nodoc:
  "use an Array object for buffering (included in Eruby class)"
end

Instance Method Details

#add_postamble(src) ⇒ Object



191
192
193
194
# File 'lib/erubis/enhancer.rb', line 191

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

#add_preamble(src) ⇒ Object



187
188
189
# File 'lib/erubis/enhancer.rb', line 187

def add_preamble(src)
  src << "_buf = [];"
end