1require 'rubygems/command_manager' 2 3## 4# This is an example of exactly what NOT to do. 5# 6# DO NOT include code like this in your rubygems_plugin.rb 7 8class Gem::Commands::InterruptCommand < Gem::Command 9 10 def initialize 11 super('interrupt', 'Raises an Interrupt Exception', {}) 12 end 13 14 def execute 15 raise Interrupt, "Interrupt exception" 16 end 17 18end 19 20Gem::CommandManager.instance.register_command :interrupt 21 22