Re: How to create "def method(item)= (value)" ?
- From: Phillip Gawlowski <cmdjackryan@xxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 08:14:05 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Iñaki Baz Castillo wrote:
|
| Yes, that exactly what I do, but I don't like it, since it's not
| intuitive. In fact I call the method "set_param(name, value)". But it
| makes the code look like Java.. brrrrr.... XD
Not commenting on the Java part (the naming in Java is usually rather
well done, IMO), but I agree, the solution isn't all too elegant because
of it's lack of intuitive assignment.
Usually, I use something like that, when I am too lazy to create an
optionhash based solution.
*adds that to TODO list for a current project*
|
| Interesting, and thanks for the useful link. :)
You are welcome. :)
- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com
Do you know why the fairy sits at the top of the Xmas tree ?
~ One year, Santa had one tree left over after giving everybody one, and
when one of his fairy helpers asked what she should do with it, he told her.
~ That`s why.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgYcJsACgkQbtAgaoJTgL+HaACeMiqRAOW+QZob0dVSghldpG/Z
b7QAoJpDBoN1X8WgA9pxjUwYu1RbJHf3
=DZOH
-----END PGP SIGNATURE-----
.
- References:
- How to create "def method(item)= (value)" ?
- From: Iñaki Baz Castillo
- Re: How to create "def method(item)= (value)" ?
- From: Phillip Gawlowski
- Re: How to create "def method(item)= (value)" ?
- From: Iñaki Baz Castillo
- How to create "def method(item)= (value)" ?
- Prev by Date: Re: How to create "def method(item)= (value)" ?
- Next by Date: Re: How to create "def method(item)= (value)" ?
- Previous by thread: Re: How to create "def method(item)= (value)" ?
- Next by thread: Re: How to create "def method(item)= (value)" ?
- Index(es):
Relevant Pages
|