Class: Template::OutputBuffer

Inherits:
Object
  • Object
show all
Defined in:
opal/stdlib/template.rb

Instance Method Summary collapse

Constructor Details

#initializeOutputBuffer

Returns a new instance of OutputBuffer



31
32
33
# File 'opal/stdlib/template.rb', line 31

def initialize
  @buffer = []
end

Instance Method Details

#append(str) ⇒ Object



35
36
37
# File 'opal/stdlib/template.rb', line 35

def append(str)
  @buffer << str
end

#append=(content) ⇒ Object



39
40
41
# File 'opal/stdlib/template.rb', line 39

def append=(content)
  @buffer << content
end

#joinObject



43
44
45
# File 'opal/stdlib/template.rb', line 43

def join
  @buffer.join
end