lib/hot_module.rb in hot_module-1.0.0.alpha11 vs lib/hot_module.rb in hot_module-1.0.0.alpha12

- old
+ new

@@ -36,10 +36,15 @@ end @registered_elements end + def self.register_element(component) + @registered_elements ||= Concurrent::Set.new + @registered_elements << component + end + # @param klass [Class] # @return [void] def self.included(klass) klass.extend ClassMethods @@ -96,10 +101,10 @@ # @param value [String] # @return [String] def tag_name(value = nil) @tag_name ||= begin - HoTModuLe.registered_elements << self + HoTModuLe.register_element self value end end # @param value [String]