Hi --
Hi all
def some_method(arg)
# How do I check here if arg is a constant or an object?
end
Constants are bound to objects:
X = "hi"
some_method(X)
The method just receives an object reference. It doesn't actually
receive a constant; the constant is just an identifier.
(Or am I misunderstanding?)
David
--
Upcoming training by David A. Black/Ruby Power and Light, LLC:
* Advancing With Rails, Edison, NJ, November 6-9
* Advancing With Rails, Berlin, Germany, November 19-22
* Intro to Rails, London, UK, December 3-6 (by Skills Matter)
See
http://www.rubypal.com for details!