/test/method_missing.rb

http://github.com/feyeleanor/RubyGoLightly · Ruby · 15 lines · 9 code · 3 blank · 3 comment · 0 complexity · f7febd7a484910c36d281a7ae5f36faa MD5 · raw file

  1. def method_missing(name, *args)
  2. puts "called method_missing"
  3. puts name
  4. end
  5. ohaie!
  6. # => called method_missing
  7. # => ohaie!
  8. def ohaie!
  9. puts "ok"
  10. end
  11. ohaie!
  12. # => ok