I think include is just a method. This is what I did in irb.
> require 'pry'
> module A
> def self.included klass
> puts "included"
> end
> end
> class B
> binding.pry
> include A
> end
when it enter into pry, I just see this
pry(B)> self.method(:include)
=> #<Method: Class(Module)#include>
so I think include is a method ,and guess included method is called when include is done. Sorry for this, I don't have any evident on this. Might have to read the ruby source code, because I ask for source_location, but got nil
pry(B)> self.method(:include).source_location
=> nil
I think ActiveSupport::Concern is used to solve the dependency problem