Ruby/Method/undef

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

undefine a method with undef.

def hello
  puts "Hello, Matz!"
end
hello # => Hello, Matz!
 
undef hello # undefines the method named hello
hello # try calling this method now