ruby-uebungen/Assignment_032/solution
Thomas Smits 58bc23516c Update of exercises 2023-05-25 17:49:42 +02:00
..
readme.md Update of exercises 2023-05-25 17:49:42 +02:00

readme.md

Lösung: Klassen per Reflection analysieren

def analyze(clazz)
  puts "Name:               #{clazz.to_s}"
  puts "Elternklasse:       #{clazz.superclass}"
  puts "Instanz-Methoden:   #{clazz.instance_methods}"
  puts "Statische-Methoden: #{clazz.singleton_methods}"
  puts "Konstanten:         #{clazz.constants}"
end

analyze(String)