Method: PluginRegistry::Plugin.priority

Defined in:
lib/utils/plugin_registry.rb

.priority(x = nil) ⇒ Numeric

This plugin’s priority. Set it by providing the priority as an argument. Higher numbers ensure that the plugin is called early to check if a target belongs to it. When called without an argument, it retrieves this plugin’s priority. Defaults to 0.

Parameters:

  • Priority (Numeric)

    as a number. Will only be set if != nil

Returns:

  • (Numeric)

    This plugin’s priority



62
63
64
65
# File 'lib/utils/plugin_registry.rb', line 62

def self.priority(x = nil)
  @priority = x unless x.nil?
  @priority || 0
end