From 1a3a0670c82a6e7d75c2ada82dd50a78d8b5de36 Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 27 Jun 2010 02:45:13 +0000 Subject: A little more documentation for Scanner. --- lib/coderay/scanner.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb index 64b3c83..cc1f665 100644 --- a/lib/coderay/scanner.rb +++ b/lib/coderay/scanner.rb @@ -181,7 +181,7 @@ module CodeRay end include Enumerable - # The current line position of the scanner. + # The current line position of the scanner. See also #column. # # Beware, this is implemented inefficiently. It should be used # for debugging only. @@ -189,7 +189,10 @@ module CodeRay string[0..pos].count("\n") + 1 end - # The current column position of the scanner. See #line. + # The current column position of the scanner. See also #line. + # + # Beware, this is implemented inefficiently. It should be used + # for debugging only. def column pos = self.pos return 0 if pos <= 0 string = string() -- cgit v1.2.1