Closed shoma07 closed 3 years ago
In this PR, add type definition(rbs) to constant using @return. If there is no @return, it continue to be untyped.
@return
We can also write @return in constant, but I'm not sure if that's the right thing to do. But I couldn't think of any other way to add the type.
example:
class A # @return [String] EXAMPLE_CONSTANT = 'Bar' end
class A EXAMPLE_CONSTANT: String end
I haven't changed rbi, so I couldn't determine if https://github.com/AaronC81/sord/issues/128 could be closed.
Awesome - thanks for your contribution! Looks good to me.
Yeah, I think we'll leave #128 open for now until RBI works too.
Thank you!
In this PR, add type definition(rbs) to constant using
@return
. If there is no@return
, it continue to be untyped.We can also write
@return
in constant, but I'm not sure if that's the right thing to do. But I couldn't think of any other way to add the type.example:
I haven't changed rbi, so I couldn't determine if https://github.com/AaronC81/sord/issues/128 could be closed.