Module: Kernel

Defined in:
lib/exceptioner/core_ext/kernel/singleton_class.rb

Instance Method Summary collapse

Instance Method Details

#class_eval(*args, &block) ⇒ Object

class_eval on an object acts like singleton_class.class_eval.



10
11
12
# File 'lib/exceptioner/core_ext/kernel/singleton_class.rb', line 10

def class_eval(*args, &block)
  singleton_class.class_eval(*args, &block)
end

#singleton_classObject

Returns the object’s singleton class.



3
4
5
6
7
# File 'lib/exceptioner/core_ext/kernel/singleton_class.rb', line 3

def singleton_class
  class << self
    self
  end
end