Sha256: 65473479c09aa0ec6b139eb56632bd6aad8e94cf184d2d0abb6429892bbd8a8f

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

module Kernel

  # Access to an object's "special" class, otherwise
  # known as it's eigenclass or metaclass or own, etc.
  #
  # One day these names must be reconciled!

  def quaclass
    (class << self; self; end)
  end
  alias_method :__quaclass__, :quaclass

end


#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TCKernel < Test::Unit::TestCase

    def test_singleton
      o = Object.new
      assert_equal( (class << o; self; end), o.quaclass )
    end

  end

=end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.4.2 lib/facets/core/kernel/quaclass.rb