We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84fdfb6 commit f5dff8aCopy full SHA for f5dff8a
2 files changed
rust/rubydex/src/model/definitions.rs
@@ -179,6 +179,18 @@ impl Definition {
179
}
180
181
182
+ #[must_use]
183
+ pub fn has_extend_mixin(&self) -> bool {
184
+ let mixins = match self {
185
+ Definition::Class(definition) => definition.mixins(),
186
+ Definition::SingletonClass(definition) => definition.mixins(),
187
+ Definition::Module(definition) => definition.mixins(),
188
+ _ => return false,
189
+ };
190
+
191
+ mixins.iter().any(|mixin| matches!(mixin, Mixin::Extend(_)))
192
+ }
193
194
#[must_use]
195
pub fn is_deprecated(&self) -> bool {
196
all_definitions!(self, it => it.flags().is_deprecated())
0 commit comments