class Phlex::SGML
def __final_call__(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: nil, fragments: nil, &block)
- Api: - private
def __final_call__(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: nil, fragments: nil, &block) @_buffer = buffer @_context = context @_view_context = view_context @_parent = parent if fragments warn "⚠️ [WARNING] Selective Rendering is experimental, incomplete, and may change in future versions." @_context.target_fragments(fragments) end block ||= @_content_block return "" unless render? if !parent && Phlex::SUPPORTS_FIBER_STORAGE original_fiber_storage = Fiber[:__phlex_component__] Fiber[:__phlex_component__] = self end @_context.around_render do around_template do if block if is_a?(DeferredRender) __vanish__(self, &block) view_template else view_template do |*args| if args.length > 0 yield_content_with_args(*args, &block) else yield_content(&block) end end end else view_template end end end unless parent if Phlex::SUPPORTS_FIBER_STORAGE Fiber[:__phlex_component__] = original_fiber_storage end buffer << context.buffer end end