Exception: RuboCop::Plugin::LoadError Private

Inherits:
Error
  • Object
show all
Defined in:
lib/rubocop/plugin/load_error.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

An exception raised when a plugin fails to load.

API:

  • private

Instance Method Summary collapse

Constructor Details

#initialize(plugin_name) ⇒ LoadError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LoadError.

API:

  • private



8
9
10
11
12
# File 'lib/rubocop/plugin/load_error.rb', line 8

def initialize(plugin_name)
  super

  @plugin_name = plugin_name
end

Instance Method Details

#messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



14
15
16
17
18
19
20
21
22
23
# File 'lib/rubocop/plugin/load_error.rb', line 14

def message
  "    Failed to load plugin `\#{@plugin_name}` because the corresponding plugin class could not be determined for instantiation.\n    Try upgrading it first (e.g., `bundle update \#{@plugin_name}`).\n    If `\#{@plugin_name}` is not yet a plugin, use `require: \#{@plugin_name}` instead of `plugins: \#{@plugin_name}` in your configuration.\n\n    For further assistance, check with the developer regarding the following points:\n    https://docs.rubocop.org/rubocop/plugin_migration_guide.html\n  MESSAGE\nend\n"