Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add singleton attribute syntax #502

Merged
merged 2 commits into from
Dec 3, 2020
Merged

Add singleton attribute syntax #502

merged 2 commits into from
Dec 3, 2020

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Dec 3, 2020

module Foo
  attr_reader self.bar: String

  # Equivalent to:
  # def self.bar: () -> String
  # self.@bar: String
end

@soutaro soutaro added this to the Ruby 3.0 milestone Dec 3, 2020
@soutaro soutaro merged commit 31a0c28 into master Dec 3, 2020
@soutaro soutaro deleted the self-attributes branch December 3, 2020 13:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant