test.rb

bon (Nobuhide Nakabo), 12/28/2009 01:24 pm

Download (213 Bytes)

 
1
class Test
2
  def self.test(&block)
3
    block.call
4
  end
5
end
6

    
7

    
8
class AAA
9
  def aaa
10
    p "---- super class ----"
11
  end
12
end
13

    
14
class AAA_2 < AAA
15
  def aaa
16
    Test.test do
17
      super
18
    end
19
  end
20
end
21

    
22
AAA_2.new.aaa