Last active
August 29, 2015 14:01
-
-
Save appsol/f7555786d620ca274c63 to your computer and use it in GitHub Desktop.
Saasbook Project 3.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Project 3.2 | |
# Print an objects class and it's ancestors up to BasicObject | |
def class_print(o) | |
c = o.class | |
until c.nil? do | |
puts c | |
c = c.superclass | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment