Sha256: 93a7765c97a3c3f878ef4a113ff119fdf07b63dc40ea4df86c6e2e3933ba890c

Contents?: true

Size: 312 Bytes

Versions: 6

Compression:

Stored size: 312 Bytes

Contents

module Locator::Wait

  WAIT_REGEX = /\A([^\p{L}]*)(>)(.*)\Z/

  module_function

  def execute(locator)
    matches = WAIT_REGEX.match(locator)

    if matches
      captures = matches.captures
      locator = "#{captures[0]}#{captures[2]}"

      [locator, nil]
    else

      [locator, 0]
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pickles-0.2.4 lib/cucumber/pickles/locator/wait.rb
pickles-0.2.3 lib/cucumber/pickles/locator/wait.rb
pickles-0.2.2 lib/cucumber/pickles/locator/wait.rb
pickles-0.2.1 lib/cucumber/pickles/locator/wait.rb
pickles-0.2.0 lib/cucumber/pickles/locator/wait.rb
pickles-0.1.12 lib/cucumber/pickles/locator/wait.rb