Method: ActiveSupport::Subscriber.method_added

Defined in:
activesupport/lib/active_support/subscriber.rb

.method_added(event) ⇒ Object

Adds event subscribers for all new methods added to the class.



69
70
71
72
73
74
75
76
77
# File 'activesupport/lib/active_support/subscriber.rb', line 69

def method_added(event)
  super
  # Only public methods are added as subscribers, and only if a notifier
  # has been set up. This means that subscribers will only be set up for
  # classes that call #attach_to.
  if public_method_defined?(event) && notifier
    add_event_subscriber(event)
  end
end