Sha256: 2df20e2621a23ddb7f8933870402186ce11cc3f59ee95dbadeb6466f94af9bac

Contents?: true

Size: 356 Bytes

Versions: 1

Compression:

Stored size: 356 Bytes

Contents

module Caco
  class Finder < Trailblazer::Operation
    step Subprocess(Caco::Executer),
      input: [:command],
      output: { exit_code: :command_exit_code, output: :command_output },
      id: "execute_command"

    step ->(ctx, command_output:, regexp:, **) {
        command_output.freeze.match?(regexp)  
      },
      id: :match_regexp
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caco-0.1.0 lib/caco/finder.rb