class Class
Public Instance Methods
hierarchy()
click to toggle source
Returns a tree-like Hash
structure of all descendants.
Examples¶ ↑
require 'socket' IO.hierarchy #=> {BasicSocket=>{UNIXSocket=>{UNIXServer=>{}}, IPSocket=>{UDPSocket=>{}, TCPSocket=>{TCPServer=>{}}}, Socket=>{}}, File=>{}}
# File core_extensions/class.rb, line 13 def hierarchy subclasses.each_with_object({}) { |k, h| h[k] = k.hierarchy } end
leaf_subclasses()
click to toggle source
lineage()
click to toggle source