[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

another FAQ

Eric-Roger Bruecklmeier

11/6/2003 1:16:00 PM

Hi rubyists,

this one may also be a FAQ but i havn't found an answer yet:

Is there a standard method wich is called if someone calls an undefined
method?

Thx

Eric.

2 Answers

ts

11/6/2003 2:01:00 PM

0

>>>>> "E" == Eric-Roger Bruecklmeier <news01@eric-bruecklmeier.de> writes:

E> Is there a standard method wich is called if someone calls an
E> undefined method?

#method_missing

svg% cat b.rb
#!/usr/bin/ruby
class A
def method_missing(*args)
p args
end
end

A.new.a(12)
svg%

svg% b.rb
[:a, 12]
svg%


--

Guy Decoux

Eric-Roger Bruecklmeier

11/6/2003 2:26:00 PM

0

ts schrieb:

> def method_missing(*args)


Thanks!

Eric.