Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/dbi.rb

Instance Method Summary collapse

Instance Method Details

#inherits_from?(klass) ⇒ Boolean

Given a Class, returns if the object's (another Class) ancestors contain that class.



67
68
69
# File 'lib/dbi.rb', line 67

def inherits_from?(klass)
    self.ancestors.include?(klass)
end