obsolete.ChilliProject/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb

20 lines
265 B
Ruby

module CodeRay
module Encoders
# = JSON Encoder
class JSON < Encoder
register_for :json
FILE_EXTENSION = 'json'
protected
def compile tokens, options
require 'json'
@out = tokens.to_a.to_json
end
end
end
end