From 4399eaf244e68ca63f609577075159e00ca4c196 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 29 Jun 2010 07:29:42 +0000 Subject: Made token methods of JSON encoder public. --- lib/coderay/encoders/json.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/coderay/encoders') diff --git a/lib/coderay/encoders/json.rb b/lib/coderay/encoders/json.rb index 3215868..9da3238 100644 --- a/lib/coderay/encoders/json.rb +++ b/lib/coderay/encoders/json.rb @@ -39,6 +39,11 @@ module Encoders @out = [] end + def finish options + @out.to_json + end + + public def text_token text, kind @out << { :type => 'text', :text => text, :kind => kind } end @@ -59,10 +64,6 @@ module Encoders @out << { :type => 'block', :action => 'end_line', :kind => kind } end - def finish options - @out.to_json - end - end end -- cgit v1.2.1