| Class | Erubis::Context |
| In: |
lib/layers/renderers/erubis.rb
|
| Parent: | Object |
This is added to the Erubis Content class to allow the same helper methods to be used with both Markaby and Erubis.
# File lib/layers/renderers/erubis.rb, line 9
9: def <<(s)
10: eval("_buf", @binding).concat s # add to rendered output
11: end
# File lib/layers/renderers/erubis.rb, line 13
13: def capture
14: eval("_context.push(_buf); _buf = ''", @binding) #ignore output from that eval, will be added via "<<"
15: result = Erubis::Eruby.new(yield).result @binding
16: eval("_buf = _context.pop", @binding)
17: result
18: end