Skip to content

Commit

Permalink
Specify deferred mode via method
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Oct 3, 2024
1 parent c27229e commit 25470bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module Phlex
autoload :CSV, "phlex/csv"
autoload :Callable, "phlex/callable"
autoload :Context, "phlex/context"
autoload :DeferredRender, "phlex/deferred_render"
autoload :ElementClobberingGuard, "phlex/element_clobbering_guard"
autoload :Elements, "phlex/elements"
autoload :Error, "phlex/error"
Expand Down
5 changes: 0 additions & 5 deletions lib/phlex/deferred_render.rb

This file was deleted.

6 changes: 5 additions & 1 deletion lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def call(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: n
@_context.around_render do
around_template do
if block
if Phlex::DeferredRender === self
if deferred?
vanish(self, &block)
view_template
else
Expand All @@ -118,6 +118,10 @@ def call(buffer = +"", context: Phlex::Context.new, view_context: nil, parent: n
end
end

def deferred?
false
end

def context
@_context.user_context
end
Expand Down

0 comments on commit 25470bb

Please sign in to comment.