Report abuse

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