From: Eko Budi Setiyo Date: 2005-02-28T14:20:45+09:00 Subject: Re: is_defined? Austin Ziegler wrote: >On Mon, 28 Feb 2005 12:11:21 +0900, Eko Budi Setiyo > wrote: > > >>Any body now how to do some thing like this in ruby >> >>is_class_defined? >>is_module_defined? >>is_methode_defined? >> >> > > def foo; end > defined?(foo) # => "method" > >Both of the following return "constant." > > class Foo; end > module Bar; end > defined?(Foo) # => "constant" > defined?(Bar) # => "constant" > >-austin > > Thanks