diff options
Diffstat (limited to 'actionview/lib/action_view/flows.rb')
-rw-r--r-- | actionview/lib/action_view/flows.rb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/actionview/lib/action_view/flows.rb b/actionview/lib/action_view/flows.rb index bc61920848..16874c1194 100644 --- a/actionview/lib/action_view/flows.rb +++ b/actionview/lib/action_view/flows.rb @@ -1,4 +1,4 @@ -require 'active_support/core_ext/string/output_safety' +require "active_support/core_ext/string/output_safety" module ActionView class OutputFlow #:nodoc: @@ -23,7 +23,6 @@ module ActionView @content[key] << value end alias_method :append!, :append - end class StreamingFlow < OutputFlow #:nodoc: @@ -37,9 +36,8 @@ module ActionView end # Try to get stored content. If the content - # is not available and we are inside the layout - # fiber, we set that we are waiting for the given - # key and yield. + # is not available and we're inside the layout fiber, + # then it will begin waiting for the given key and yield. def get(key) return super if @content.key?(key) @@ -60,8 +58,8 @@ module ActionView end # Appends the contents for the given key. This is called - # by provides and resumes back to the fiber if it is - # the key it is waiting for. + # by providing and resuming back to the fiber, + # if that's the key it's waiting for. def append!(key, value) super @fiber.resume if @waiting_for == key @@ -69,8 +67,8 @@ module ActionView private - def inside_fiber? - Fiber.current.object_id != @root - end + def inside_fiber? + Fiber.current.object_id != @root + end end end |