summaryrefslogtreecommitdiff
path: root/lib/coderay/scanner.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-06-27 02:45:13 +0000
committermurphy <murphy@rubychan.de>2010-06-27 02:45:13 +0000
commit1a3a0670c82a6e7d75c2ada82dd50a78d8b5de36 (patch)
tree28da44f9a0119b63cb1d9343e036097691cff8f2 /lib/coderay/scanner.rb
parentd9344bf169a641e7e1738a5fd04bcf3cb7c17022 (diff)
downloadcoderay-1a3a0670c82a6e7d75c2ada82dd50a78d8b5de36.tar.gz
A little more documentation for Scanner.
Diffstat (limited to 'lib/coderay/scanner.rb')
-rw-r--r--lib/coderay/scanner.rb7
1 files 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()