module ActionView::Helpers::CaptureHelper
Public Instance Methods
capture(*args) { |*args| ... }
click to toggle source
# File lib/express_templates/components/content_for.rb, line 19 def capture(*args) value = nil buffer = with_output_buffer { value = yield(*args) } value = value.to_s if value.is_a?(Arbre::Element) || value.is_a?(Arbre::ElementCollection) if string = buffer.presence || value and string.is_a?(String) ERB::Util.html_escape string end end