summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers/plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/helpers/plugin.rb')
-rw-r--r--lib/coderay/helpers/plugin.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index 3aa79e4..922c528 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -281,6 +281,14 @@ module Plugin
plugin_host.register self, *ids
end
+ def title title = nil
+ if title
+ @title = title.to_s
+ else
+ @title ||= name[/([^:]+)$/, 1]
+ end
+ end
+
# The host for this Plugin class.
def plugin_host host = nil
if host and not host.is_a? PluginHost