-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mixes_in_class_methods support #77
Conversation
# https://github.com/sorbet/sorbet-typed/edit/master/lib/yard/all/yard.rbi | ||
# | ||
# typed: strict | ||
# typed: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blocks on sorbet/sorbet-typed#374
I've included that change here, but i'll update this file in a separate commit once that PR is accepted.
end | ||
|
||
class A # error: Missing definition for abstract method | ||
include M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is lifted from https://sorbet.org/docs/abstract#interfaces-and-the-included-hook
One can also invoke yard doc
on this test file to very that that A
is documented as extending M::ClassMethods
:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hang on, this has a 🐛 : The documentation for A
should indicate that it includes M
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(False alarm, that's due to the IgnoreMonkeyPatchMixins
handler i use to avoid warnings when self-documenting)
Codecov Report
@@ Coverage Diff @@
## main #77 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 18 21 +3
Lines 691 739 +48
=========================================
+ Hits 691 739 +48
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing. Proxy objects are new to me but overall logic and tests makes sense 👍
Adds support for
mixes_in_class_methods
, extending the class methods namespace when the surrounding module is included.