Class: Class

Inherits:
Object show all
Defined in:
lib/core/class.rb

Instance Method Summary collapse

Instance Method Details

#object_stringsObject

td: used to be :objects, change tb_* files to reflect change



15
16
17
# File 'lib/core/class.rb', line 15

def object_strings #:nodoc:
  objects.map {|e| e.to_s}
end

#objectsObject

Returns all objects of class.



8
9
10
11
12
# File 'lib/core/class.rb', line 8

def objects
  object = []
  ObjectSpace.each_object(self) {|e| object.push(e) }
  object
end

#real_ancestorsObject

Returns ancestors that aren’t included modules and the class itself.



3
4
5
# File 'lib/core/class.rb', line 3

def real_ancestors
  ancestors - included_modules - [self]
end