Class: ViewComponentDevtools::Subscriber
- Inherits:
-
Object
- Object
- ViewComponentDevtools::Subscriber
- Defined in:
- lib/view_component_devtools/subscriber.rb
Constant Summary collapse
- EVENT_NAMES =
["render.view_component", "!render.view_component"].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.install! ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/view_component_devtools/subscriber.rb', line 10 def install! @install_mutex ||= Mutex.new @install_mutex.synchronize do @subscriptions ||= EVENT_NAMES.map do |event_name| ActiveSupport::Notifications.subscribe(event_name, new) end end end |