Files

Class Index [+]

Quicksearch

CodeRay::Encoders::JSON

JSON Encoder

Constants

FILE_EXTENSION

Protected Instance Methods

block_token(action, kind) click to toggle source
    # File lib/coderay/encoders/json.rb, line 26
26:     def block_token action, kind
27:       { :type => 'block', :action => action, :kind => kind }
28:     end
finish(options) click to toggle source
    # File lib/coderay/encoders/json.rb, line 30
30:     def finish options
31:       @out.to_json
32:     end
setup(options) click to toggle source
    # File lib/coderay/encoders/json.rb, line 12
12:     def setup options
13:       begin
14:         require 'json'
15:       rescue LoadError
16:         require 'rubygems'
17:         require 'json'
18:       end
19:       @out = []
20:     end
text_token(text, kind) click to toggle source
    # File lib/coderay/encoders/json.rb, line 22
22:     def text_token text, kind
23:       { :type => 'text', :text => text, :kind => kind }
24:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.