another FAQ

  • Thread starter Eric-Roger Bruecklmeier
  • Start date
E

Eric-Roger Bruecklmeier

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.
 
T

ts

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%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,352
Latest member
DianeKulik

Latest Threads

Top