Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Process non-self singleton classes#581

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
castwide merged 1 commit intocastwide:masterfromk0kubun:concrete-sclass
Dec 8, 2022

Conversation

k0kubun
Copy link
Contributor

To avoid deep indentation while still usingprivate and skippingdef self., I sometimes declare a class and define singleton methods on it withclass << Example = Class.new. I'd like Solargraph to process its children.

class <<Example=Class.newdeffoobarendprivatedefbar"example"endend

The currentSclassNodessupports onlyclass << self, so I extended it to handle the aboveCDECL case as well asCONST case, .e.g.class << Example.

@k0kubun
Copy link
ContributorAuthor

@castwide Any thoughts? I'll close this if you're uncomfortable with supporting this feature. I use this syntax in many of my projects and it's been painful whenever solargraph without this is installed.

@castwide
Copy link
Owner

I've been meaning to support this for a while. Thanks for taking care of it.

k0kubun reacted with heart emoji

@castwidecastwide merged commita2dbacb intocastwide:masterDec 8, 2022
@k0kubunk0kubun deleted the concrete-sclass branchDecember 8, 2022 06:59
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@k0kubun@castwide

[8]ページ先頭

©2009-2025 Movatter.jp