summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers/plugin.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-04-19 00:13:41 +0000
committermurphy <murphy@rubychan.de>2006-04-19 00:13:41 +0000
commitf5f50a14c523327a28b39eeb0223261434d6d9f7 (patch)
tree611e101502bed11f09f5054a59c23d0a71095eb7 /lib/coderay/helpers/plugin.rb
parent8b65a055f6627a6ce6d6874219775fa1f603dd31 (diff)
downloadcoderay-f5f50a14c523327a28b39eeb0223261434d6d9f7.tar.gz
New Version: 0.7.0!
Adjusted gem.rake. HTML scanner fixed. Enhanced filetype.rb: .rake files, xml, yaml (preparing for YAML scanner.) Enhanced test/ruby/1.in.rb. Added XML scanner with example. plugin.rb: made all_plugin_names public.
Diffstat (limited to 'lib/coderay/helpers/plugin.rb')
-rw-r--r--lib/coderay/helpers/plugin.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index c55e565..2b47d8e 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -157,6 +157,17 @@ module PluginHost
@plugin_hash ||= create_plugin_hash
end
+ # Returns an array of all .rb files in the plugin path.
+ #
+ # The extension .rb is not included.
+ def all_plugin_names
+ Dir[path_to('*')].select do |file|
+ File.basename(file)[/^(?!_)\w+\.rb$/]
+ end.map do |file|
+ File.basename file, '.rb'
+ end
+ end
+
protected
# Created a new plugin list and stores it to @plugin_hash.
def create_plugin_hash
@@ -204,17 +215,6 @@ protected
end
end
- # Returns an array of all .rb files in the plugin path.
- #
- # The extension .rb is not included.
- def all_plugin_names
- Dir[path_to('*')].select do |file|
- File.basename(file)[/^(?!_)\w+\.rb$/]
- end.map do |file|
- File.basename file, '.rb'
- end
- end
-
# Returns the Plugin for +id+.
# Use it like Hash#fetch.
#