From a05a7d11b1bc08f3817076dcb669bc6ef9d6d264 Mon Sep 17 00:00:00 2001 From: murphy Date: Sat, 5 Nov 2005 14:37:40 +0000 Subject: bench/bench.rb: Added SilverCity benchmarking demo/demo_load_encoder.rb enhanced demo/demo_load_scanner.rb added .outs added plugin.rb: Fixed load_all encoder.rb, scanner.rb adjusted helpers/word_list.rb: Fixed a bug in CaseIgnoringWordList.new TODO: Updated new ROADMAP coderay.rb: increased Version number added Version System documentation --- lib/coderay/helpers/plugin.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/coderay/helpers/plugin.rb') diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb index 5c90901..63c3739 100644 --- a/lib/coderay/helpers/plugin.rb +++ b/lib/coderay/helpers/plugin.rb @@ -105,10 +105,19 @@ module PluginHost end end + # A Hash of plugion_id => Plugin pairs. def plugin_hash @plugin_hash ||= create_plugin_hash end + def inspect + map = plugin_hash.dup + map.each do |id, plugin| + map[id] = plugin.name[/(?>[\w_]+)$/] + end + map.inspect + end + # Every plugin must register itself for one or more # +ids+ by calling register_for, which calls this method. @@ -137,7 +146,7 @@ module PluginHost # Loads all plugins using all_plugin_names and load. def load_all for plugin in all_plugin_names - load_plugin plugin + load plugin end end -- cgit v1.2.1