File: module.rb

package info (click to toggle)
ruby-introspection 0.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 200 kB
  • sloc: ruby: 685; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module Grandaddy
  def foo
    puts "Grandaddy#foo"
    super
  rescue NoMethodError
  end
end

module Daddy
  def foo
    puts "Daddy#foo"
    super
  rescue NoMethodError
  end
  include Grandaddy
end

module Sonny
  def self.foo
    puts "Sonny.foo"
    super
  rescue NoMethodError
  end
  extend Daddy
end

Sonny.foo