Sha256: cdeaf56cfdfc6dc96041e3f8b192eb5ab1a71a95251e624e64b3357dde05638a

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/command_manager'

##
# This is an example of exactly what NOT to do.
#
# DO NOT include code like this in your rubygems_plugin.rb

class Gem::Commands::InterruptCommand < Gem::Command

  def initialize
    super('interrupt', 'Raises an Interrupt Exception', {})
  end

  def execute
    raise Interrupt, "Interrupt exception"
  end

end

Gem::CommandManager.instance.register_command :interrupt

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubygems-update-2.6.3 test/rubygems/rubygems_plugin.rb
rubygems-update-2.6.2 test/rubygems/rubygems_plugin.rb
rubygems-update-2.6.1 test/rubygems/rubygems_plugin.rb
rubygems-update-2.6.0 test/rubygems/rubygems_plugin.rb
rubygems-update-2.5.2 test/rubygems/rubygems_plugin.rb