class AWS::Flow::Templates::FlowDefaultResultActivityRuby

Default result reporting activity class for the AWS Flow Framework for Ruby

Public Class Methods

new(writer=nil) click to toggle source

@param writer IO

An optional IO file descripter to write the result to.
# File lib/aws/templates/default.rb, line 120
def initialize(writer=nil)
  @writer = writer
end

Public Instance Methods

run(input) click to toggle source

Serialize the input and write it to an IO writer if provided

# File lib/aws/templates/default.rb, line 125
def run(input)
  unless input.is_a?(Hash) && input.include?(:key) && input.include?(:result)
    raise ArgumentError, "Incorrect input format for "\
      "FlowDefaultResultActivityRuby.run"
  end
  @writer.puts Marshal.dump(input) if @writer
end