Sha256: 79eac4a79d5cbbb2604bd1a277527d193a0229eb7f8303a4fffff8b52f175f7e

Contents?: true

Size: 712 Bytes

Versions: 6661

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,661 entries across 6,649 versions & 72 rubygems

Version Path
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/coderay-1.1.1/lib/coderay/encoders/yaml.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/coderay-1.1.1/lib/coderay/encoders/yaml.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/coderay-1.1.1/lib/coderay/encoders/yaml.rb
logstash-filter-base64-1.0.0 vendor/bundle/jruby/2.3.0/gems/coderay-1.1.1/lib/coderay/encoders/yaml.rb
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
coderay-1.1.1 lib/coderay/encoders/yaml.rb
coderay-1.1.1.rc1 lib/coderay/encoders/yaml.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-codec-json-2.0.3/vendor/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
logstash-codec-json-2.0.3 vendor/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb