class Temple::Generators::StringBuffer

Implements a string buffer.

_buf = ''
_buf << "static"
_buf << dynamic.to_s
_buf

@api public

Public Instance Methods

create_buffer() click to toggle source
# File lib/temple/generators/string_buffer.rb, line 13
def create_buffer
  "#{buffer} = ''.dup"
end
on_dynamic(code) click to toggle source
# File lib/temple/generators/string_buffer.rb, line 21
def on_dynamic(code)
  concat("(#{code}).to_s")
end
return_buffer() click to toggle source
# File lib/temple/generators/string_buffer.rb, line 17
def return_buffer
  buffer
end