Module: Erubis::ArrayEnhancer

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

Overview

return array instead of string

this is only for Eruby.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.descObject

:nodoc:



160
161
162
# File 'lib/erubis/enhancer.rb', line 160

def self.desc   # :nodoc:
  "return array instead of string"
end

Instance Method Details

#add_postamble(src) ⇒ Object



168
169
170
171
# File 'lib/erubis/enhancer.rb', line 168

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

#add_preamble(src) ⇒ Object



164
165
166
# File 'lib/erubis/enhancer.rb', line 164

def add_preamble(src)
  src << "#{@bufvar} = [];"
end