Method: ActionView::StreamingFlow#get
- Defined in:
- actionview/lib/action_view/flows.rb
#get(key) ⇒ Object
Try to get stored content. If the content is not available and we’re inside the layout fiber, then it will begin waiting for the given key and yield.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'actionview/lib/action_view/flows.rb', line 43 def get(key) return super if @content.key?(key) if inside_fiber? view = @view begin @waiting_for = key view.output_buffer, @parent = @child, view.output_buffer Fiber.yield ensure @waiting_for = nil view.output_buffer, @child = @parent, view.output_buffer end end super end |