diff options
author | murphy <murphy@rubychan.de> | 2010-06-29 07:29:42 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-06-29 07:29:42 +0000 |
commit | 4399eaf244e68ca63f609577075159e00ca4c196 (patch) | |
tree | 4f314319fe116c773183a5cab25c2aacb87c577a /lib/coderay/encoders/json.rb | |
parent | ca8991535b81bbcf48ef95d57cd1e9f6e1a5ace0 (diff) | |
download | coderay-4399eaf244e68ca63f609577075159e00ca4c196.tar.gz |
Made token methods of JSON encoder public.
Diffstat (limited to 'lib/coderay/encoders/json.rb')
-rw-r--r-- | lib/coderay/encoders/json.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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 |