This website requires JavaScript.
Explore
Help
Sign In
smits
/
ruby-uebungen
Watch
1
Star
3
Fork
You've already forked ruby-uebungen
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
fe2c1c6eb6
ruby-uebungen
/
Assignment_034
/
solution
/
readme.md
616 B
Raw
Blame
History
Lösung: Klasse dynamisch erzeugen
```ruby def create_class(super_class) Class.new(super_class) do def who_am_i puts "Ich bin ein Kind von #{self.class.superclass}" end end end
Test = create_class(Object) t = Test.new t.who_am_i