Typically at the end of an interactive script there's a menu section, something like:
if( not file_loaded?("............."))
XXXXXXXXXXXXXXXXX
file_loaded="..........."
The "............." is the script's name and the XXXXXXXXXXXXXXXX part is the menu definition - this is so it only loads once if for some reason you manually load the script etc you'll only get one menu item.
To add a right-click context-menu you need to add some code - like azuby's or similar forms. You replace the title and 'action' to suit... so in "Mirror.rb" it's:
...
UI.add_context_menu_handler do |menu|
if Sketchup.active_model.selection
menu.add_separator
menu.add_item("Mirror Selection") { Sketchup.active_model.select_tool MirrorTool.new}
end#if
end#do menu
...
inside the if loop at the end as well as the normal Plugins Menu instructions...
Azuby's equivalent way would be:
...
UI.add_context_menu_handler{|menu|menu.add_separator;menu.add_item("Mirror Selection"){Sketchup.active_model.select_tool MirrorTool.new}}
...