Kain Nobel
Member
Good day everybody, I was curious if there was an easy method to check if certain objects exist, or certain objects have been defined?
For example, my Custom Menu System enhances alot of other Window/Scene scripts I've made, but the enhancements are supposed to only be optional as long as the 'CMS' module exists.
So, for the CMS plug-ins I need to be able to detect if the module CMS is there or not. I know there are certain ways you could possibly do it, like a statment such as 'unless CMS.nil?', but what is the proper way to check if something exists or if it's been defined?
This question is talking about all objects in general, such as classes, modules, constants, etc.
I'm not sure if there is a different syntax to check each kind of object, but if there is can somebody fill me in on what could come in handy for checking an objects existance?
For example, my Custom Menu System enhances alot of other Window/Scene scripts I've made, but the enhancements are supposed to only be optional as long as the 'CMS' module exists.
So, for the CMS plug-ins I need to be able to detect if the module CMS is there or not. I know there are certain ways you could possibly do it, like a statment such as 'unless CMS.nil?', but what is the proper way to check if something exists or if it's been defined?
This question is talking about all objects in general, such as classes, modules, constants, etc.
I'm not sure if there is a different syntax to check each kind of object, but if there is can somebody fill me in on what could come in handy for checking an objects existance?