From: "Adão Raul" Date: 2011-08-24T18:44:20+09:00 Subject: Re: "args = nil" in method signature --4e54c7ea_66334873_5d7 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline When the signature of the method is variable=3Dsome=5Fvalue, means that w= henthe method is called without passing that parameter will automatically= be assigned the value given to it. In your case, args will be automatically nil. --=20 - Ad=C3=A3o Raul + http://about.me/adaoraul + =E3=82=B6=E4=B8=BB=E4=BA=BA=E3=82=A6=E3=82=A7=E3=83=96=E9=96=8B=E7=99=BA= =E8=80=85 (Hah=3F=21) On Wednesday, August 24, 2011 at 6:30 AM, Michelle Pace wrote: > Hello, please could somebody explain to me what the =22args =3D nil=22 = in the > method signature does=3F And why/when would you use such a convention=3F= >=20 >=20 > def request=5Fpost(resource, args =3D nil) > request(resource, =22post=22, args) > end >=20 > =23 example method call on request=5Fpost > request=5Fpost(=22api/v2/projects/my=5Fproject/murmur.xml=22, > 'murmur=5Bbody=5D' =3D> =22I murmur this message here=22) >=20 >=20 > Thank-you in advance, Michelle >=20 > --=20 > Posted via http://www.ruby-forum.com/. --4e54c7ea_66334873_5d7--