Skip to content

Commit

Permalink
Improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Feb 12, 2025
1 parent f4f2f30 commit 9b9d0c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def render(renderable = nil, &)
renderable.each { |r| render(r, &) }
when Proc, Method
if renderable.arity == 0
__yield_content_with_no_args__(&renderable)
__yield_content_with_no_yield_args__(&renderable)
else
__yield_content__(&renderable)
end
Expand Down Expand Up @@ -334,13 +334,13 @@ def __yield_content__
nil
end

def __yield_content_with_no_args__
def __yield_content_with_no_yield_args__
return unless block_given?

buffer = @_state.buffer

original_length = buffer.bytesize
content = yield
content = yield # <-- doesn’t yield self 😉
__implicit_output__(content) if original_length == buffer.bytesize

nil
Expand Down

0 comments on commit 9b9d0c1

Please sign in to comment.