summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/encoders/json.rb')
-rw-r--r--lib/coderay/encoders/json.rb9
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