It calls the method of the delete class for the self class.
class Example def self.delete puts "Class method. 'self' is a " + self.class.to_s end def delete! puts "Instance method. 'self' is a " + self.class.to_s self.class.delete end end Example.new.delete!
Outputs:
Instance method. 'self' is a Example
Class method. 'self' is a Class
source share