Class Object
In: lib/rucola/rucola_support/core_ext/ruby/object.rb
lib/rucola/test_helper.rb
Parent: Object

Methods

Public Class methods

Returns an array of all the class methods that were added by extending the class.

 class FooBar; end

 module Baz
   def a_new_class_method; end
 end
 FooBar.extend(Baz)

 FooBar.extended_class_methods # => ['a_new_class_method']

Returns a class‘s metaclass.

  class FooBar; end
  p FooBar.metaclass # => #<Class:FooBar>

Returns an array of all the class methods that were defined in only this class, so without class methods from any of it‘s superclasses or from extending it.

Returns an array of all the class methods that were defined in this class without the ones that were defined in it‘s superclasses.

 class FooBar
   def self.a_original_class_method
   end
 end

 class FooBarSubclass < FooBar
   def self.a_original_class_method_in_a_subclass
   end
 end

 FooBarSubclass.own_class_methods # => ['a_original_class_method_in_a_subclass']

Public Instance methods

A mocha helper to get at an instance variable without having to use instance_variable_get.

  obj.ivar(:some_ivar).expects(:foo)

[Validate]