rbs
rbs copied to clipboard
Support auto extending module (via AncestorBuilder)
In Ruby language, developers need to use both "include" and "extend" to implement mix-in having instance methods and class methods. The auto extending module is a well-known technique to realize it (ex. ActiveSupport::Concern, "extend" call in included block, and so on).
This supports the auto extending modules via modules having "autoextend:..." annotation. The RBS::DefinitionBuilder searches the extended modules from the annotations of the included modules.
This is yet another version of #1503. This modifies RBS::DefinitionBuilder::AncestorBuilder#one_singleton_ancestors to get auto-extending modules.
- pros
- Simple feature and simple implementation
- cons
- Do not support nested auto-extend (recursively) as ActiveSupport::Concern does.