Sha256: 2c62ca1fef08d93069b5a640d6983e0c659626b0663107d732b1fe73a0c3d1fb

Contents?: true

Size: 312 Bytes

Versions: 5

Compression:

Stored size: 312 Bytes

Contents

# encoding: utf-8
require "belzebuth/wait_condition/base"

module Belzebuth module WaitCondition
  class RegularExpression < Base
    def initialize(expression)
      @expression = expression
    end

    def call(process)
      process.stdout_lines.any? { |line| @expression.match(line) }
    end
  end
end end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
belzebuth-0.2.3 lib/belzebuth/wait_condition/regular_expression.rb
belzebuth-0.2.2 lib/belzebuth/wait_condition/regular_expression.rb
belzebuth-0.2.1 lib/belzebuth/wait_condition/regular_expression.rb
belzebuth-0.2.0 lib/belzebuth/wait_condition/regular_expression.rb
belzebuth-0.1.0 lib/belzebuth/wait_condition/regular_expression.rb