summaryrefslogtreecommitdiff
path: root/lib/coderay/scanner.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-01-01 06:10:14 +0000
committermurphy <murphy@rubychan.de>2010-01-01 06:10:14 +0000
commit44fcff8ba9831cede39b02d9fdc866fe5ecf785c (patch)
tree6eb6a8f9192ef6dc969a78f2f1fb0fa6f6722522 /lib/coderay/scanner.rb
parent4b904e78981c8a12a7b53c20b35434f51458b66d (diff)
downloadcoderay-44fcff8ba9831cede39b02d9fdc866fe5ecf785c.tar.gz
New method Scanner#lang.
Diffstat (limited to 'lib/coderay/scanner.rb')
-rw-r--r--lib/coderay/scanner.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb
index 8233b2c..d6dd19f 100644
--- a/lib/coderay/scanner.rb
+++ b/lib/coderay/scanner.rb
@@ -152,6 +152,11 @@ module CodeRay
alias code string
alias code= string=
+ # Returns the Plugin ID for this scanner.
+ def lang
+ self.class.plugin_id
+ end
+
# Scans the code and returns all tokens in a Tokens object.
def tokenize new_string=nil, options = {}
options = @options.merge(options)