Class: Class
Instance Method Summary collapse
-
#inherits?(ancestor) ⇒ Boolean
Returns true if
self
inherits fromancestor
.
Instance Method Details
#inherits?(ancestor) ⇒ Boolean
Returns true if self
inherits from ancestor
3 4 5 6 7 8 9 10 |
# File 'lib/bake/extensions/class.rb', line 3 def inherits?(ancestor) sup = self while sup return true if sup.equal?(ancestor) sup = sup.superclass end return false end |