Class: Class
Instance Method Summary collapse
-
#object_strings ⇒ Object
td: used to be :objects, change tb_* files to reflect change.
-
#objects ⇒ Object
Returns all objects of class.
-
#real_ancestors ⇒ Object
Returns ancestors that aren’t included modules and the class itself.
Instance Method Details
#object_strings ⇒ Object
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 |
#objects ⇒ Object
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_ancestors ⇒ Object
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 |