Module: Erubis::StringBufferEnhancer
- Included in:
- RubyGenerator, StringBufferEruby
- Defined in:
- lib/erubis/enhancer.rb
Overview
use String class for buffering
this is only for Eruby.
Class Method Summary collapse
-
.desc ⇒ Object
:nodoc:.
Instance Method Summary collapse
Class Method Details
.desc ⇒ Object
:nodoc:
206 207 208 |
# File 'lib/erubis/enhancer.rb', line 206 def self.desc # :nodoc: "use a String object for buffering" end |
Instance Method Details
#add_postamble(src) ⇒ Object
214 215 216 217 |
# File 'lib/erubis/enhancer.rb', line 214 def add_postamble(src) src << "\n" unless src[-1] == ?\n src << "#{@bufvar}.to_s\n" end |
#add_preamble(src) ⇒ Object
210 211 212 |
# File 'lib/erubis/enhancer.rb', line 210 def add_preamble(src) src << "#{@bufvar} = '';" end |