lib/erector/abstract_widget.rb
# Creates a whole new output string, executes the block, then converts the
# output string to a string and returns it as raw text. If at all possible
# you should avoid this method since it hurts performance, and use +widget+
# instead.
Creates a whole new output string, executes the block, then converts the
output string to a string and returns it as raw text. If at all possible
you should avoid this method since it hurts performance, and use +widget+
instead.
Creates a whole new output string executes the block then converts the output string to a string and returns it as raw text . If at all possible you should avoid this method since it hurts performance and use + widget + instead .
def capture
      original, @_output = output, Output.new
      yield
      original.widgets.concat(output.widgets) 
      output.to_s
    ensure
      @_output = original
    end
def capture original , @_output = output , Output . new yield original . widgets . concat ( output . widgets ) output . to_s ensure @_output = original end
Creates a whole new output string, executes the block, then converts the
output string to a string and returns it as raw text.
Creates a whole new output string executes the block then converts the output string to a string and returns it as raw text .
# todo: test!!!