Module: ConcernedInheritance::ClassMethods

Defined in:
lib/concerned_inheritance/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#inherited_callbacksObject



3
4
5
6
7
8
9
# File 'lib/concerned_inheritance/class_methods.rb', line 3

def inherited_callbacks
  (self.singleton_class.ancestors + self.ancestors).select do |ancestor|
    ancestor.instance_variable_defined? :@inherited_callbacks
  end.map do |ancestor|
    ancestor.instance_variable_get :@inherited_callbacks
  end.flatten
end