summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/debug.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-13 04:46:11 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-13 04:46:11 +0200
commit88b812274a808f69675445a9265dab1d4e41cc44 (patch)
tree1c3cb1a6f87aa5c85d3ffbf2575df6dd68c3b2a1 /lib/coderay/encoders/debug.rb
parentdf21150ed089f1e3d1d35badde23b2d905a421cd (diff)
downloadcoderay-88b812274a808f69675445a9265dab1d4e41cc44.tar.gz
refactor check functionality to DebugLint encoder
Diffstat (limited to 'lib/coderay/encoders/debug.rb')
-rw-r--r--lib/coderay/encoders/debug.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/coderay/encoders/debug.rb b/lib/coderay/encoders/debug.rb
index 94d52af..61520a1 100644
--- a/lib/coderay/encoders/debug.rb
+++ b/lib/coderay/encoders/debug.rb
@@ -18,14 +18,7 @@ module Encoders
FILE_EXTENSION = 'raydebug'
- def initialize options = {}
- super
- @opened = []
- end
-
def text_token text, kind
- raise 'empty token' if $CODERAY_DEBUG && text.empty?
-
if kind == :space
@out << text
else
@@ -36,26 +29,18 @@ module Encoders
end
def begin_group kind
- @opened << kind if $CODERAY_DEBUG
-
@out << "#{kind}<"
end
def end_group kind
- raise "We are inside #{@opened.inspect}, not #{kind}" if $CODERAY_DEBUG && @opened.pop != kind
-
@out << '>'
end
def begin_line kind
- @opened << kind if $CODERAY_DEBUG
-
@out << "#{kind}["
end
def end_line kind
- raise "We are inside #{@opened.inspect}, not #{kind}" if $CODERAY_DEBUG && @opened.pop != kind
-
@out << ']'
end