I know that if you use super in Ruby it means call the parent's same method.
But in some code I see this:
def self.post(*args); handle_response super end
I wonder what the super means here?
I know that if you use super in Ruby it means call the parent's same method.
But in some code I see this:
def self.post(*args); handle_response super end
I wonder what the super means here?
super
invokes the superclass method; so super
returns what the superclass method returns.
Here, the post
method defined on the superclass is invoked and its return value is passed on to the handle_response
method.