From: Girard Fred Date: 2007-12-07T19:03:51+09:00 Subject: Re: function like "function_exits" Peter Bunyan wrote: >> Thanks for your answer Robert. >> It's not a method but a simple function like >> def foo() >> #some code >> end >> >> is there something like : >> functions.exist?('foo') > > A method and a function are the same thing. Also, check this out. > > def foo > puts "Foo is being called." > end > > methods.include? "foo" > => true > > method("foo").call > "Foo is being called." Thanks a lot Peter, it's the answer i m looking for;) Just one thing: a method, for me, is 'function or procedure' from an object a function (standalone one) is some instructions that returns a result a procedure (standalone one) execute instructions without necessary returns result It wrong or old scool ?;) Anyway thanks -- Posted via http://www.ruby-forum.com/.