Add Redmine::Plugin.installed?(:name) method to check if a plugin is installed
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4293 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
397222f198
commit
c399e76324
|
@ -90,6 +90,13 @@ module Redmine #:nodoc:
|
||||||
@registered_plugins = {}
|
@registered_plugins = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Checks if a plugin is installed
|
||||||
|
#
|
||||||
|
# @param [String] id name of the plugin
|
||||||
|
def self.installed?(id)
|
||||||
|
registered_plugins[id.to_sym].present?
|
||||||
|
end
|
||||||
|
|
||||||
def initialize(id)
|
def initialize(id)
|
||||||
@id = id.to_sym
|
@id = id.to_sym
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue