tags:

views:

50

answers:

1

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?

+2  A: 

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.

banister