It's because you are sending the "rdf_schema" message (trying to
invoke the method) on the *class* Mine. When you right code in a class
definition that isn't part of a method, as you did, that code is
executed in the context of the class; i.e. any methods you invoke will
be sent to the class object, instead of an instance of that class.
rdf_schema is an instance method, so you need an instance of Mine to
invoke it.

You could make rdf_schema a class method, and then your code would work:

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!