Report abuse

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
require 'osx/cocoa'

class Super < OSX::NSObject

  def self.new
    alloc.init
  end

  def self.alloc
    puts :alloc
    super_alloc
  end

  def init
    puts :init
    super_init
  end

end

class Sub < Super

  def initialize
    puts :initialize
  end

end

s = Sub.new
puts s.class