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:



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

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

Instance Method Details

#add_postamble(src) ⇒ Object



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

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

#add_preamble(src) ⇒ Object



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

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