I have some questions about the commands and set handlers. First off, I was able to base using shortcuts to hashes to get their values to make the commands displayed without getting too much in trouble:
First, I created a hash:
module HeartFire Foods = { "Bacon" => {:bacon => $food_num = 1}, "Eggs" => {:eggs => $food_num = 2}, "Hamburger" => {:hamberger => $food_num = 3} }endand on the add_commands I tried doing it like this:
#-------------------------------------------------------------------------- # * Add Main Commands to List #-------------------------------------------------------------------------- def add_main_commands HeartFire::Foods.each_key { |i| add_command(i, :foods) } end so every commands are automatically displayed on the commands. My only problem is how can I upgrade my hash so it can also display the ones in the set_handler on the menu?
If so, how?
First, I created a hash:
module HeartFire Foods = { "Bacon" => {:bacon => $food_num = 1}, "Eggs" => {:eggs => $food_num = 2}, "Hamburger" => {:hamberger => $food_num = 3} }endand on the add_commands I tried doing it like this:
#-------------------------------------------------------------------------- # * Add Main Commands to List #-------------------------------------------------------------------------- def add_main_commands HeartFire::Foods.each_key { |i| add_command(i, :foods) } end so every commands are automatically displayed on the commands. My only problem is how can I upgrade my hash so it can also display the ones in the set_handler on the menu?
If so, how?