You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
# Todo figure out how children rendering should happen, probably should have special method that pushes children into the buffer
23
-
# i.e. render_child/render_children that takes Element/Array[Element] and does the push into the buffer
24
-
if !name && (# !name means called from outer render so we check that it has rendered correctly
25
-
(@buffer.count > 1) || # should only render one element
26
-
(@buffer.count == 1 && @buffer.last != result) || # it should return that element
27
-
(@buffer.count == 0 && !(result.is_a?(String) || (result.respond_to?(:acts_as_string?) && result.acts_as_string?) || result.is_a?(Element)))#for convience we will also convert the return value to a span if its a string
28
-
)
29
-
raise"a components render method must generate and return exactly 1 element or a string"
30
-
end
31
-
32
-
@buffer << result.to_sifresult.is_a?String || (result.respond_to?(:acts_as_string?) && result.acts_as_string?)# For convience we push the last return value on if its a string
0 commit comments