moduleCaptureHelperdefcapture_erb(*args,&block)
buffer = eval('_erbout', block.binding)
capture_erb_with_buffer(buffer,*args,&block)endalias_method:capture,:capture_erbalias_method:capture_block,:capture_erbdefcapture_erb_with_buffer(buffer,*args,&block)
pos = buffer.length
block.call(*args)# extract the block
data = buffer[pos..-1]# replace it in the original with empty string
buffer[pos..-1]=''
data
endend# module CaptureHelper
Webby::Helpers.register(CaptureHelper)