Class: Burner::Library::Serialize::Yaml

Inherits:
JobWithRegister show all
Defined in:
lib/burner/library/serialize/yaml.rb

Overview

Treat value like a Ruby object and serialize it using YAML.

Expected Payload input: anything. Payload output: string representing the output of the YAML serializer.

Constant Summary

Constants inherited from JobWithRegister

JobWithRegister::BLANK

Instance Attribute Summary

Attributes inherited from JobWithRegister

#register

Attributes inherited from Job

#name

Instance Method Summary collapse

Methods inherited from JobWithRegister

#initialize

Methods inherited from Job

#initialize

Methods included from Util::Arrayable

#array

Constructor Details

This class inherits a constructor from Burner::JobWithRegister

Instance Method Details

#perform(_output, payload) ⇒ Object



18
19
20
# File 'lib/burner/library/serialize/yaml.rb', line 18

def perform(_output, payload)
  payload[register] = payload[register].to_yaml
end