Sha256: 7d70a5b4dcd3922bbaf3db10b806148fc7992aa461c5d6fc2fe470d3be183ef3

Contents?: true

Size: 341 Bytes

Versions: 2

Compression:

Stored size: 341 Bytes

Contents

require 'json'

module Rodimus
  module Simulation

    class Step2 < Rodimus::Step
      def before_run_set_output
        fd = IO.sysopen('/dev/null', 'w')
        @outgoing = IO.new(fd, 'w')
      end

      def process_row(row)
        row = JSON.parse(row)
        row.map { |i| i.split('').sort.join('') }
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rodimus-1.3.1 lib/rodimus/simulation/step2.rb
rodimus-1.3.0 lib/rodimus/simulation/step2.rb