lib/react/rendering_context.rb
def run_child_block(is_outer_scope)
        result = yield
        result = result.to_s.span if result.try :acts_as_string? || result.is_a?(String)
        @buffer << result if result.is_a?(String) || (result.is_a?(React::Element) && @buffer.empty?)
        raise_render_error(result) if is_outer_scope && @buffer != [result]
      end
# run_child_block gathers the element(s) generated by a child block.
# for example when rendering this div: div { "hello".span; "goodby".span }
# two child Elements will be generated.
#
# the final value of the block should either be
#   1 an object that responds to :acts_as_string?
#   2 a string,
#   3 an element that is NOT yet pushed on the rendering buffer
#   4 or the last element pushed on the buffer
#
# in case 1 we change the object to a string, and then it becomes case 2
# in case 2 we automatically push the string onto the buffer
# in case 3 we also push the Element onto the buffer IF the buffer is empty
# case 4 requires no special processing
#
# Once we have taken care of these special cases we do a check IF we are in an
# outer rendering scope.  In this case react only allows us to generate 1 Element
# so we insure that is the case, and also check to make sure that element in the buffer
# is the element returned
run_child_block gathers the element(s) generated by a child block.
for example when rendering this div: div { "hello".span; "goodby".span }
two child Elements will be generated.

the final value of the block should either be
1 an object that responds to :acts_as_string.
2 a string,
3 an element that is NOT yet pushed on the rendering buffer
4 or the last element pushed on the buffer

in case 1 we change the object to a string, and then it becomes case 2
in case 2 we automatically push the string onto the buffer
in case 3 we also push the Element onto the buffer IF the buffer is empty
case 4 requires no special processing

Once we have taken care of these special cases we do a check IF we are in an
outer rendering scope.  In this case react only allows us to generate 1 Element
so we insure that is the case, and also check to make sure that element in the buffer
is the element returned
run_child_block gathers the element ( s ) generated by a child block . for example when rendering this div : div { " hello " . span ; " goodby " . span } two child Elements will be generated . the final value of the block should either be 1 an object that responds to : acts_as_string . 2 a string 3 an element that is NOT yet pushed on the rendering buffer 4 or the last element pushed on the buffer in case 1 we change the object to a string and then it becomes case 2 in case 2 we automatically push the string onto the buffer in case 3 we also push the Element onto the buffer IF the buffer is empty case 4 requires no special processing Once we have taken care of these special cases we do a check IF we are in an outer rendering scope . In this case react only allows us to generate 1 Element so we insure that is the case and also check to make sure that element in the buffer is the element returned
def run_child_block(is_outer_scope)
        result = yield
        result = result.to_s.span if result.try :acts_as_string? || result.is_a?(String)
        @buffer << result if result.is_a?(String) || (result.is_a?(React::Element) && @buffer.empty?)
        raise_render_error(result) if is_outer_scope && @buffer != [result]
      end
def run_child_block ( is_outer_scope ) result = yield result = result . to_s . span if result . try :acts_as_string? || result . is_a? ( String ) @buffer << result if result . is_a? ( String ) || ( result . is_a? ( React :: Element ) && @buffer . empty? ) raise_render_error ( result ) if is_outer_scope && @buffer != [ result ] end
run_child_block gathers the element(s) generated by a child block.
run_child_block gathers the element ( s ) generated by a child block .
is_outer_scope