Sha256: 4ece755d687936093aa61d18b7070344410315927ba00f3f0bb8e9d2aa1d3c89
Contents?: true
Size: 746 Bytes
Versions: 34
Compression:
Stored size: 746 Bytes
Contents
require "plugins/pluginator/extensions/conversions" module Pluginator::Extensions # Extension to find class or first plugin that answers the question with true or to print warning module FindCheck include Conversions def find_check(name) klass = string2class(name) @plugins["checks"].detect do |plugin| class2name(plugin) == klass || plugin.respond_to?(:aliases) && plugin.public_send(:aliases).include?(name.to_sym) end || begin $stderr.puts "Could not find plugin supporting #{name} / #{klass}, available plugins: #{available_plugins}" nil end end def available_plugins @plugins["checks"].map{|plugin| class2name(plugin) }.join(", ") end end end
Version data entries
34 entries across 34 versions & 1 rubygems