[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [QUIZ] metakoans.rb (#67

Michael Ulm

2/21/2006 7:43:00 AM

Awesome quiz! Here is my solution, quite ugly I'm afraid.

Meta_value = {}

def attribute(name, &block)
(name.is_a?(Hash) ? name : {name => nil}).each do |key, value|
define_method(key.to_sym) do
if Meta_value[[self, key]].nil?
Meta_value[[self, key]] = (block_given? ? instance_eval(&block) : value)
else
Meta_value[[self, key]]
end
end
define_method((key + "=").to_sym) {|val| Meta_value[[self, key]] = val}
define_method((key + "?").to_sym) {not Meta_value[[self, key]].nil?}
end
end



--
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: michael.ulm@isis-papyrus.com
Visit our Website: www.isis-papyrus.com

---------------------------------------------------------------
This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS accepts
no responsibility for malicious or inappropriate content.
---------------------------------------------------------------


1 Answer

John Q Public

9/1/2009 12:04:00 PM

0

On 2009-09-01 01:00:09 -0400, "Triba la raza! LAX will take over the
U.S.!" <triba_la_raza@yahoo.com> said:

> On Aug 31, 7:54?pm, John Q Public <my2ce...@me.com> wrote:
>> On 2009-08-31 15:30:03 -0400, "Triba la raza! LAX will take over the
>> U.S.!" <triba_la_r...@yahoo.com> said:
>>
>>
>>
>>
>>
>>> On Aug 31, 1:02?pm, John Q Public <my2ce...@me.com> wrote:
>>>> On 2009-08-31 09:40:02 -0400, "Ice Cream too?"
>>>> <cake_and_eat_it_...@yahoo.com> said:
>>
>>>>> http://news.yahoo.com/s/ap/20090831/ap_on_bi_ge/us_bailo...
>>
>>>>> imagine that! ?americans finally making money off of de nasty, sinf
> ul
>>>>> national banks, instead of vice versy!
>>
>>>>> all hail our president obama!
>>
>>>>> hooooo haaaaaaaaa!!!!!!
>>
>>>>> alt.politics,alt.politics.economics,alt.fan.rush-
>>>>> limbaugh,alt.politics.republicans,alt.politics.democrats.d
>>
>>>>> All Hail the Genius Known as our President Obama! ?Report: US makes
> $
>>> 4
>>>>> billion from bailout banks
>>
>>>> Whoooeee, fill us in on when ol O'bambi will be returnin said dollars
>>>> to us instead o keepin it
>>>> to buy som Acorn votes with it
>>
>>> much as the truly sinful GWBush smiled on all his ghoulish friends in
>>> the 'defense' industry in the Iraq and Afghanistan 'initiatives', John
>>> Q. Public? ?even Cheney, now hat he is dropping ?dimes on "good ol'
>>> GW" (as fookin' if?) now CONFESSES that the Iraq 'initiative' was a
>>> sham operation?!?
>>
>>> *smiles*
>>
>>> boy, you conservative, sinful neocons sure are easy pickings nowadays,
>>> aren't you, papi?
>>
>> Bush was too liberal as was McCain, both parties deserve a thrashin but
>> you little fuckin socialists most of all because you are the most
>> dangerous for our freedom. Call me what ya will but stickin all of us
>> into the same pot is what got you little lickasses in the shit now.- Hide
> quoted text -
>>
>> - Show quoted text -
>
> hey, you sorry white trash NIGGER republicunt! you keep talking like
> that, and someone here is damn sure going to JAPSLAP you, stone cold
> calling you on your SHIT!
>
> just try it punk!

Your a moron, and you lick ass more than kick ass. Only fightin you ever did
was over who got to suck the scum outta the used condom