Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3444
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail |
|---|---|
| From | Brian Candler <b.candler@pobox.com> |
| Newsgroups | comp.lang.ruby |
| Subject | Re: Set attribute of superclass dynamically |
| Date | Sun, 24 Apr 2011 14:50:12 -0500 |
| Organization | Service de news de lacave.net |
| Lines | 13 |
| Message-ID | <fd613edf58283c237e6a1eca446ccb04@ruby-forum.com> (permalink) |
| References | <ebce7d6a4bf3664dc0904383f9352c21@ruby-forum.com> <81c6dca0642a6bf7c2031f06c826817b@ruby-forum.com> |
| NNTP-Posting-Host | bristol.highgroove.com |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | talisker.lacave.net 1303674662 44881 65.111.164.187 (24 Apr 2011 19:51:02 GMT) |
| X-Complaints-To | abuse@lacave.net |
| NNTP-Posting-Date | Sun, 24 Apr 2011 19:51:02 +0000 (UTC) |
| In-Reply-To | <81c6dca0642a6bf7c2031f06c826817b@ruby-forum.com> |
| X-Received-From | This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway |
| X-Mail-Count | 382131 |
| X-Ml-Name | ruby-talk |
| X-Rubymirror | Yes |
| X-Ruby-Talk | <fd613edf58283c237e6a1eca446ccb04@ruby-forum.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.ruby:3444 |
Show key headers only | View raw
Jeroen v. wrote in post #994769:
> In the module you can do:
> self.send("#{method_name}=", value)
> This creates a setter on the fly for the superclass ;)
That *calls* the setter method, but only if it already exists. If it
doesn't, it will raise an exception.
You need to provide some code to demonstrate what you're saying.
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Set attribute of superclass dinamically "Jeroen v." <jeroeningen@gmail.com> - 2011-04-24 09:29 -0500
Re: Set attribute of superclass dynamically Brian Candler <b.candler@pobox.com> - 2011-04-24 11:00 -0500
Re: Set attribute of superclass dynamically "Jeroen v." <jeroeningen@gmail.com> - 2011-04-24 12:13 -0500
Re: Set attribute of superclass dynamically Brian Candler <b.candler@pobox.com> - 2011-04-24 14:50 -0500
Re: Set attribute of superclass dinamically Josh Cheek <josh.cheek@gmail.com> - 2011-04-24 12:29 -0500
csiph-web