Sha256: 79eac4a79d5cbbb2604bd1a277527d193a0229eb7f8303a4fffff8b52f175f7e

Contents?: true

Size: 712 Bytes

Versions: 7061

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

7,061 entries across 7,048 versions & 75 rubygems

Version Path
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb
mfk_openapi_ruby_client-1.0.0 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
passbase-1.2.0 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.27 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.26 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
qiita_org-0.1.25 gems/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
passbase-1.1.0 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
passbase-1.0.3 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
passbase-1.0.2 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb
passbase-1.0.1 vendor/bundle/ruby/2.7.0/gems/coderay-1.1.3/lib/coderay/encoders/yaml.rb