Sha256: eada172c128f2343acc2cd9e406884ce2a8d3dca037262abcbe49a5c108ea623
Contents?: true
Size: 665 Bytes
Versions: 2
Compression:
Stored size: 665 Bytes
Contents
module CodeRay module Encoders # = YAML Encoder # # Slow. class YAML < Encoder register_for :yaml FILE_EXTENSION = 'yaml' protected def setup options require 'yaml' @out = [] end def finish options @out.to_a.to_yaml end public def text_token text, kind @out << [text, kind] end def begin_group kind @out << [:begin_group, kind] end def end_group kind @out << [:end_group, kind] end def begin_line kind @out << [:begin_line, kind] end def end_line kind @out << [:end_line, kind] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
coderay-1.0.0.738.pre | ./lib/coderay/encoders/yaml.rb |
coderay-1.0.0.598.pre | ./lib/coderay/encoders/yaml.rb |