Sha256: 4e53335dadd281efa7126e3c523d1184d1bd047e56de8aa0e2a8eed5d986d478

Contents?: true

Size: 180 Bytes

Versions: 39

Compression:

Stored size: 180 Bytes

Contents

module Kernel
  # Returns the object's singleton class.
  def singleton_class
    class << self
      self
    end
  end unless respond_to?(:singleton_class) # exists in 1.9.2
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
gorillib-0.1.6 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.5 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.4 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.3 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.2 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.1 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.0 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.8 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.7 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.6 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.5 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.4 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.3 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.0.2 lib/gorillib/metaprogramming/singleton_class.rb
dm-core-1.1.0.rc3 lib/dm-core/ext/singleton_class.rb
reflexive-0.1.2 lib/reflexive/core_ext/kernel/singleton_class.rb
reflexive-0.1.1 lib/reflexive/core_ext/kernel/singleton_class.rb
reflexive-0.1.0 lib/reflexive/core_ext/kernel/singleton_class.rb
reflexive-0.0.6 lib/reflexive/core_ext/kernel/singleton_class.rb