Sha256: bce3e60cf9761b9f387f029ab055a736eb69c276b13c54ae7277b5e6656bc901

Contents?: true

Size: 209 Bytes

Versions: 9

Compression:

Stored size: 209 Bytes

Contents

require 'traject/line_writer'
require 'yaml'

class Traject::YamlWriter < Traject::LineWriter
  def serialize(context)
    context.output_hash.to_yaml(:indentation=>3, :line_width => 78) + "\n\n"
  end
end
  

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
traject-0.16.0 lib/traject/yaml_writer.rb
traject-0.15.0 lib/traject/yaml_writer.rb
traject-0.14.1 lib/traject/yaml_writer.rb
traject-0.13.2 lib/traject/yaml_writer.rb
traject-0.13.1 lib/traject/yaml_writer.rb
traject-0.13.0 lib/traject/yaml_writer.rb
traject-0.12.0 lib/traject/yaml_writer.rb
traject-0.11.0 lib/traject/yaml_writer.rb
traject-0.10.0 lib/traject/yaml_writer.rb