Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 637 Bytes

compiler_activesupportconcern.md

File metadata and controls

33 lines (26 loc) · 637 Bytes

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