Method: CodeRay::Encoders::Encoder#encode_tokens

Defined in:
lib/coderay/encoder.rb

#encode_tokens(tokens, options = {}) ⇒ Object

Encode a Tokens object.



72
73
74
75
76
77
78
# File 'lib/coderay/encoder.rb', line 72

def encode_tokens tokens, options = {}
  options = @options.merge options
  @scanner = tokens.scanner if tokens.respond_to? :scanner
  setup options
  compile tokens, options
  finish options
end