class Denmark::Plugins
metrics class
Public Class Methods
new(options)
click to toggle source
# File lib/denmark/plugins.rb, line 9 def initialize(options) if options[:enable] disable = Denmark::Plugins.plugins.keys - options[:enable].map(&:to_sym) options[:disable] ||= Array.new options[:disable].concat disable end Denmark::Plugins.disregard_plugins(*options[:disable]) Denmark::Plugins.initialize_plugins end
Public Instance Methods
list()
click to toggle source
# File lib/denmark/plugins.rb, line 19 def list str = " Available smell test plugins\n" str += " ===============================\n\n" Denmark::Plugins.plugins.each do |name, plugin| str += name.to_s str += "\n--------\n" str += plugin.description.strip str += "\n\n" end str end
run(mod, repo)
click to toggle source
# File lib/denmark/plugins.rb, line 31 def run(mod, repo) results = [] Denmark::Plugins.plugins.each do |_name, plugin| plugin.setup results.concat plugin.run(mod, repo) plugin.cleanup end results end