Re: XML

Armin Roehrl <[email protected]>
Newsgroups gmane.comp.lang.ruby.german
Organization Approximity GmbH
Message-ID <[email protected]>
> Trotzdem danke für deine Ausführungen :) Ich hatte gehofft, dass es
> eventuell so ginge, wie du im "p.s." angesprochen hast. Aber man kann doch
> bei Ruby einer Klasse zur Laufzeit Methoden hinzufügen, oder?
armin@galere:~> irb
irb(main):001:0> class Ding; def to_s; "ding"; end; end
nil
irb(main):002:0> a = Ding.new
ding
irb(main):003:0> def a.to_s; "a"; end
nil
irb(main):004:0> a.to_s
"a"
irb(main):005:0> b=Ding.new
ding
irb(main):006:0> b.to_s
"ding"
irb(main):007:0> class Ding; def to_s; "42"; end; end
nil
irb(main):008:0> b.to_s
"42"
irb(main):009:0>

Ciao,
	Armin.

-----------------------------------------------
Armin Roehrl, http://www.approximity.com
Training, Development and Mentoring
OOP, XP, Java, Ruby, Smalltalk, Datamining, Parallel computing, Webservices

Rubybuch: http://approximity.com/rubybuch/

Agile Entwicklerkonferenz: 22. und 23.10 in Nürnberg.
http://www.approximity.com/public/conferences/AgileConf.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.