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.

Returns:

  • (Boolean)


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

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