From 44fcff8ba9831cede39b02d9fdc866fe5ecf785c Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 1 Jan 2010 06:10:14 +0000 Subject: New method Scanner#lang. --- lib/coderay/scanner.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/coderay/scanner.rb') 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) -- cgit v1.2.1