Class: Phlex::Reactive::Streamable::ThreadViewContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/phlex/reactive/streamable.rb

Overview

A per-thread cache entry: an off-request view context + the Turbo TagBuilder bound to it, tagged with the renderer + generation it was built for. Rebuilt on a thread when the renderer object changes or the class generation is bumped — so a reset/reload/renderer-swap is picked up without ever sharing a mutable context across threads.

Instance Attribute Summary collapse

Instance Attribute Details

#builderObject

Returns the value of attribute builder

Returns:

  • (Object)

    the current value of builder



34
35
36
# File 'lib/phlex/reactive/streamable.rb', line 34

def builder
  @builder
end

#generationObject

Returns the value of attribute generation

Returns:

  • (Object)

    the current value of generation



34
35
36
# File 'lib/phlex/reactive/streamable.rb', line 34

def generation
  @generation
end

#rendererObject

Returns the value of attribute renderer

Returns:

  • (Object)

    the current value of renderer



34
35
36
# File 'lib/phlex/reactive/streamable.rb', line 34

def renderer
  @renderer
end

#view_contextObject

Returns the value of attribute view_context

Returns:

  • (Object)

    the current value of view_context



34
35
36
# File 'lib/phlex/reactive/streamable.rb', line 34

def view_context
  @view_context
end