I ran into this code snippet in a codeWars solution.
def invert(list)
list.map(&:-@)
end
I've never seen the @
before in ruby. It looks like it lets you specify an operation on the iterator in a &:
anonymous function call.
I'm trying to work on my ruby terminology. What is the @
called in Ruby and when was it introduced?