Module: Bystander::ClassMethods
- Defined in:
- lib/bystander/class_methods.rb
Constant Summary collapse
- @@methods_to_notify =
[]
- @@redefined_methods =
[]
Instance Method Summary collapse
Instance Method Details
#method_added(method) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/bystander/class_methods.rb', line 13 def method_added method if notify?(method) && !redefined?(method) @@redefined_methods << method wrap_instance_method instance_method(method) end end |
#notify(methods) ⇒ Object
9 10 11 |
# File 'lib/bystander/class_methods.rb', line 9 def notify methods @@methods_to_notify = methods end |
#singleton_method_added(method) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/bystander/class_methods.rb', line 20 def singleton_method_added method if notify?(method) && !redefined?(method) @@redefined_methods << method wrap_class_method method(method) end end |