class YARD::Serializers::ProcessSerializer

serializer.serialize(object, “data!”)
serializer = ProcessSerializer.new(‘less’)
@example Serializing to a pager (less)
Serializes an object to a process (like less)

def initialize(cmd)

Parameters:
  • cmd (String) -- the command that will accept data on stdin
def initialize(cmd)
  @cmd = cmd
end

def serialize(_object, data)

of the associated command
Overrides serialize behaviour and writes data to standard input
def serialize(_object, data)
  IO.popen(@cmd, 'w') {|io| io.write(data) }
end