rbs icon indicating copy to clipboard operation
rbs copied to clipboard

RFC: new `Attribute#ivar` API

Open amomchilov opened this issue 1 year ago • 2 comments

My proposal for fixing #2109. Feedback welcome!

amomchilov avatar Dec 02 '24 20:12 amomchilov

I'm generally good for this. My suggestion is dropping location and comment.

soutaro avatar Dec 18 '24 09:12 soutaro

I'm sorry for confusion. 🙇‍♂️

I think reusing the AST structure is good for this, while introducing a new class looks a bit too much.

Simply adding a new methods seem the best way:

  • instance_variable_name: Symbol | nil -- the new method!
  • raw_instance_variable_name: Symbol | false | nil -- to avoid information loss
  • ivar_name: Symbol | false | nil -- keep it for compatibility until rbs-4.0, which will be deprecated soon.

soutaro avatar Dec 19 '24 01:12 soutaro