File: instance.rb

package info (click to toggle)
ruby-introspection 0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 643; makefile: 2
file content (110 lines) | stat: -rw-r--r-- 1,334 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module Kernel
  def foo
    puts "Kernel#foo"
    super
  rescue NoMethodError
  end
end

class Object
  def foo
    puts "Object#foo"
    super
  rescue NoMethodError
  end
end

module GreatUncle
  def foo
    puts "GreatUncle#foo"
    super
  rescue NoMethodError
  end
end

module GreatAunt
  def foo
    puts "GreatAunt#foo"
    super
  rescue NoMethodError
  end
end

class Grandaddy
  def foo
    puts "Grandaddy#foo"
    super
  rescue NoMethodError
  end
  include GreatUncle, GreatAunt
end

module Uncle
  def foo
    puts "Uncle#foo"
    super
  rescue NoMethodError
  end
end

module Aunt
  def foo
    puts "Aunt#foo"
    super
  rescue NoMethodError
  end
end

class Daddy < Grandaddy
  def foo
    puts "Daddy#foo"
    super
  rescue NoMethodError
  end
  include Uncle, Aunt
end

module Brother
  def foo
    puts "Brother#foo"
    super
  rescue NoMethodError
  end
end

module HalfSister
  def foo
    puts "HalfSister#foo"
    super
  rescue NoMethodError
  end
end

module Sister
  def foo
    puts "Sister#foo"
    super
  rescue NoMethodError
  end
  include HalfSister
end

class Sonny < Daddy
  def foo
    puts "Sonny#foo"
    super
  rescue NoMethodError
  end
  include Brother, Sister
end

sonny = Sonny.new
class << sonny
  def foo
    puts "sonny#foo"
    super
  rescue NoMethodError
  end
end

sonny.foo