Closed k0kubun closed 1 year ago
@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.
I've been meaning to support this for a while. Thanks for taking care of it.
To avoid deep indentation while still using
private
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.The current
SclassNodes
supports onlyclass << self
, so I extended it to handle the aboveCDECL
case as well asCONST
case, .e.g.class << Example
.