class Class
A Ruby-specific class.
Definitions
def container?
A class is a container for other definitions.
Implementation
def container?
true
end
def short_form
The short form of the class.
e.g. class Animal
.
Implementation
def short_form
"class #{path_name.last}"
end
def long_form
The long form of the class.
e.g. class Dog < Animal
.
Implementation
def long_form
if super_class = self.super_class
"#{qualified_form} < #{super_class}"
else
qualified_form
end
end
def qualified_form
The fully qualified name of the class.
e.g. class ::Barnyard::Dog
.
Implementation
def qualified_form
"class #{self.qualified_name}"
end