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
memoist-0.14.0 lib/memoist/core_ext/singleton_class.rb
memoist-0.13.0 lib/memoist/core_ext/singleton_class.rb
memoist-0.12.0 lib/memoist/core_ext/singleton_class.rb
memoist-0.11.0 lib/memoist/core_ext/singleton_class.rb
memoist-0.10.0 lib/memoist/core_ext/singleton_class.rb
memoist-0.9.3 lib/memoist/core_ext/singleton_class.rb
memoist-0.9.2 lib/memoist/core_ext/singleton_class.rb
gorillib-0.6.0 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.5.2 lib/gorillib/metaprogramming/singleton_class.rb
memoist-0.9.1 lib/memoist/core_ext/singleton_class.rb
memoist-0.9.0 lib/memoist/core_ext/singleton_class.rb
gorillib-0.5.0 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.4.2 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.4.2pre lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.4.0pre lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.4.1pre lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.11 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.9 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.8 lib/gorillib/metaprogramming/singleton_class.rb
gorillib-0.1.7 lib/gorillib/metaprogramming/singleton_class.rb