Define method Is sensitive that the or not: What is it possible to define Since you only have to check constants: ? Returns the result for the syllabic expression given as an argument, for example, the result of
is defined? Foo
foo is really any defined variable / method, it does not matter if the
foo is a string Is defined as a valid (existing) expression:
foo = "array"
foo = "nonExistingConstant"
? The logic given is a level extension? That is, for
foo = "Array" , it should be returned to
"continuous" and
foo = "NonExistingConstant" , it should be sent to < Code> zero . if so, how?
['array' , 'Nonexistent class']. Do each. Name | What is called Object.const_defined? (Name) end # & gt; & Gt; True # & gt; & Gt; False
No comments:
Post a Comment