From one of the online resource I found the below code:

module FooBar
  def hello
    puts 2
    super
  end
end

class Foo
  def hello
    puts 'hello'
  end
end

class Bar < Foo
  include FooBar
  def hello
    puts 1
    super
  end
end

Bar.new.hello

Output:

#1
#2
#hello
#=> nil

I really did never meet with such techniques. Can anyone help me by 
saying what technique it is? How only with `super` `hello` method has 
been called in chain and produced the outputs?


Thanks in advance!

-- 
Posted via http://www.ruby-forum.com/.