What does Ruby syntax mean: if self <Class :: Name?
2 answers
Check superclass / subclass.
This checks if the Example::Class::Namesuperclass is selfsuch a declaration:
class DemonstrationClass < Example::Class::Name
#de body of sub-class
def cascade *parameters
#de ...do work
super #de passes all parameters to the same method name of the super-class.
#de this even works on an initialize method declaration!
end
end
Instances DemonstrationClassare subclasses of the superclass Example::Class::Name.
Subclasses have a special feature that allows you to do things such as what I showed in the method cascade, and much more.
:
+2