compiler_activesupportconcern.md

August 6, 2025 ยท View on GitHub

ActiveSupportConcern

Tapioca::Dsl::Compilers::ActiveSupportConcern generates RBI files for classes that both extend ActiveSupport::Concern and include another class that extends ActiveSupport::Concern

For example for the following hierarchy:

# concern.rb
module Foo
 extend ActiveSupport::Concern
 module ClassMethods; end
end

module Bar
 extend ActiveSupport::Concern
 module ClassMethods; end
 include Foo
end

class Baz
 include Bar
end

this compiler will produce the RBI file concern.rbi with the following content:

# typed: true
module Bar
  mixes_in_class_methods(::Foo::ClassMethods)
end