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 12 def create_buffer "#{buffer} = ''" end
on_dynamic(code)
click to toggle source
# File lib/temple/generators/string_buffer.rb, line 20 def on_dynamic(code) concat("(#{code}).to_s") end
return_buffer()
click to toggle source
# File lib/temple/generators/string_buffer.rb, line 16 def return_buffer buffer end