Sha256: 79eac4a79d5cbbb2604bd1a277527d193a0229eb7f8303a4fffff8b52f175f7e

Contents?: true

Size: 712 Bytes

Versions: 6991

Compression:

Stored size: 712 Bytes

Contents

autoload :YAML, 'yaml'

module CodeRay
module Encoders
  
  # = YAML Encoder
  #
  # Slow.
  class YAML < Encoder
    
    register_for :yaml
    
    FILE_EXTENSION = 'yaml'
    
  protected
    def setup options
      super
      
      @data = []
    end
    
    def finish options
      output ::YAML.dump(@data)
    end
    
  public
    def text_token text, kind
      @data << [text, kind]
    end
    
    def begin_group kind
      @data << [:begin_group, kind]
    end
    
    def end_group kind
      @data << [:end_group, kind]
    end
    
    def begin_line kind
      @data << [:begin_line, kind]
    end
    
    def end_line kind
      @data << [:end_line, kind]
    end
    
  end
  
end
end

Version data entries

6,991 entries across 6,978 versions & 75 rubygems

Version Path
torquebox-console-0.3.0 vendor/bundle/jruby/1.9/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
coderay-1.1.0.rc3 lib/coderay/encoders/yaml.rb
coderay-1.1.0.rc2 lib/coderay/encoders/yaml.rb
coderay-1.1.0.rc1 lib/coderay/encoders/yaml.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
torquebox-console-0.2.5 vendor/bundle/jruby/1.9/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
torquebox-console-0.2.4 vendor/bundle/jruby/1.9/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
torquebox-console-0.2.3 vendor/bundle/jruby/1.9/gems/coderay-1.0.9/lib/coderay/encoders/yaml.rb
coderay-1.0.9 lib/coderay/encoders/yaml.rb
coderay-1.0.9.rc1 lib/coderay/encoders/yaml.rb
coderay-1.0.8 lib/coderay/encoders/yaml.rb
coderay-1.0.8.rc1 lib/coderay/encoders/yaml.rb
coderay-1.0.7 lib/coderay/encoders/yaml.rb
coderay-1.0.7.rc2 lib/coderay/encoders/yaml.rb
coderay-1.0.7.rc1 lib/coderay/encoders/yaml.rb
coderay-1.0.6 lib/coderay/encoders/yaml.rb
coderay-1.0.6.rc1 lib/coderay/encoders/yaml.rb