Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (23 sloc) 418 Bytes
module Temple
module Generators
# Implements a string buffer.
#
# _buf = ''
# _buf << "static"
# _buf << dynamic.to_s
# _buf
#
# @api public
class StringBuffer < ArrayBuffer
def create_buffer
"#{buffer} = ''"
end
def return_buffer
buffer
end
def on_dynamic(code)
concat("(#{code}).to_s")
end
end
end
end
You can’t perform that action at this time.