Skip to content

Commit

Permalink
Remove element clobbering guard (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper authored Oct 3, 2024
1 parent c27229e commit 85fc0f2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 39 deletions.
3 changes: 1 addition & 2 deletions lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@

module Phlex
autoload :ArgumentError, "phlex/errors/argument_error"
autoload :DoubleRenderError, "phlex/errors/double_render_error"
autoload :BlackHole, "phlex/black_hole"
autoload :CSV, "phlex/csv"
autoload :Callable, "phlex/callable"
autoload :Context, "phlex/context"
autoload :DeferredRender, "phlex/deferred_render"
autoload :ElementClobberingGuard, "phlex/element_clobbering_guard"
autoload :DoubleRenderError, "phlex/errors/double_render_error"
autoload :Elements, "phlex/elements"
autoload :Error, "phlex/error"
autoload :FIFO, "phlex/fifo"
Expand Down
18 changes: 0 additions & 18 deletions lib/phlex/element_clobbering_guard.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/phlex/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,4 @@ def filename
def content_type
"text/html"
end

# This should be extended after all method definitions
extend Phlex::ElementClobberingGuard
end
12 changes: 12 additions & 0 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -577,4 +577,16 @@ def __styles__(styles)
buffer
end
end

private_class_method def self.method_added(method_name)
if method_name == :view_template
location = instance_method(method_name).source_location[0]

if location[0] in "/" | "."
Phlex.__expand_attribute_cache__(location)
end
else
super
end
end
end
3 changes: 0 additions & 3 deletions lib/phlex/svg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ def content_type
def filename
nil
end

# This should be extended after all method definitions
extend Phlex::ElementClobberingGuard
end
13 changes: 0 additions & 13 deletions quickdraw/sgml/element_clobbering_guard.test.rb

This file was deleted.

0 comments on commit 85fc0f2

Please sign in to comment.