Sha256: 1112e1874edb077bf8d008f2754ff8feb8b07de95f12b03b3cfad3092e340b7a

Contents?: true

Size: 392 Bytes

Versions: 7

Compression:

Stored size: 392 Bytes

Contents

# copied from activesupport/core_ext from Rails, MIT license
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

  # class_eval on an object acts like singleton_class.class_eval.
  def class_eval(*args, &block)
    singleton_class.class_eval(*args, &block)
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
ruby-dbus-openplacos-0.7.0 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-0.7.0 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-openplacos-0.6.2 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-openplacos-0.6.1 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-openplacos-0.6.0 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-0.6.0 lib/dbus/core_ext/kernel/singleton_class.rb
ruby-dbus-0.5.0 lib/dbus/core_ext/kernel/singleton_class.rb