Actions
Feature #19898
openSpecial syntax for instance variable assignment
Status:
Open
Assignee:
-
Target version:
-
Description
Since keyword arg assignment is already DRY with omitting of argument of the same name, what about DRYing out an instance var assignment? Something like this, with "@" for example, since it's already used to assign instance vars / memoize
def initialize(payload)
@payload = payload
end
def abc(d)
@d = d
end
# to be have a short from of
def initialize(@payload)
end
def abc(@d)
end
Actions
Like0
Like0