Skip to content

Commit

Permalink
Includiing Phlex::Renderable::Classmethods into Phlex::HtmlRenderable…
Browse files Browse the repository at this point in the history
… and Phlex::SvgRenderable
  • Loading branch information
iachettifederico committed Jan 20, 2024
1 parent 5d6b6dd commit 3fe8f16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/phlex/html_renderable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def self.included(including_class)
UNBUFFERED_MUTEX = Mutex.new

module ClassMethods
include Phlex::Renderable::ClassMethods

# @api private
def __unbuffered_class__
UNBUFFERED_MUTEX.synchronize do
Expand Down
6 changes: 6 additions & 0 deletions lib/phlex/svg_renderable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ module SvgRenderable
include Phlex::SVG::StandardElements

def self.included(including_class)
including_class.extend(ClassMethods)

# This should be extended after all method definitions
including_class.extend(ElementClobberingGuard)
end

module ClassMethods
include Phlex::Renderable::ClassMethods
end
end
end

0 comments on commit 3fe8f16

Please sign in to comment.