Class: Wukong::Processor::ToInspect

Inherits:
Serializer show all
Defined in:
lib/wukong/widget/serializers.rb

Overview

A widget for serializing inputs to Ruby's inspect format.

Examples:

Serializing to Ruby's inspect format at the end of a data flow


Wukong.dataflow(:emits_inspected) do
  ... | to_inspect
end

Constant Summary

Constants inherited from Wukong::Processor

SerializerError

Instance Attribute Summary

Attributes included from Hanuman::StageInstanceMethods

#graph

Instance Method Summary collapse

Methods inherited from Serializer

#handle_error

Methods inherited from Wukong::Processor

configure, description, #finalize, #perform_action, #receive_action, #setup, #stop

Methods included from Logging

included

Methods inherited from Hanuman::Stage

#clone

Methods included from Hanuman::StageClassMethods

#builder, #label, #register, #set_builder

Methods included from Hanuman::StageInstanceMethods

#add_link, #linkable_name, #root

Instance Method Details

#process(record) {|inspected| ... } ⇒ Object

Yields the input record(s) passed through Ruby's inspect.

Parameters:

  • (Array<Object>)

Yields:

  • (inspected)

Yield Parameters:



273
274
275
# File 'lib/wukong/widget/serializers.rb', line 273

def process(record)
  yield record.inspect
end