private Method

CaptureHelper.capture_erb_with_buffer(buffer, *args, &block)

There's no documentation for this item.

Source Code

# File action_view/helpers/capture_helper.rb, line 140
def capture_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
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.