[Rails] '=>' : Ruby or Rails?
Alex Young
alex at blackkettle.org
Fri Mar 31 17:40:50 GMT 2006
Bill Walton wrote:
> I'm trying to find an explanation of the difference between '=' and
> '=>'. I thought a good first step would be finding out whether this is
> a Ruby or a Rails construct. Then I'd dig in before bothering the
> list. No joy at step 1. Can anybody point me to the right documentation?
It's Ruby.
In brief, '=' is a general assignment, while '=>' is specifically for
key-value relationships in hashes.
Theres some documentation here:
http://www.rubycentral.com/book/intro.html
--
Alex
More information about the Rails
mailing list