J
Jim
Hello,
I have a Menu class with a add_item method, which takes a name
followed by a proc:
Menu("TopLevelMenuName").add_item("NewMenuItemName") { puts "Hello" }
I want to hijack this method so I can customize the menu in which the
proc is associated.
Class Menu
alias :_add_item :add_item
def add_item( *args )
p args
end
end
This captures the menuname string, but how do I get at the associated
proc?
Thanks.
I have a Menu class with a add_item method, which takes a name
followed by a proc:
Menu("TopLevelMenuName").add_item("NewMenuItemName") { puts "Hello" }
I want to hijack this method so I can customize the menu in which the
proc is associated.
Class Menu
alias :_add_item :add_item
def add_item( *args )
p args
end
end
This captures the menuname string, but how do I get at the associated
proc?
Thanks.