Sha256: ff58f9be0d14a62a465698f11321eae8f6f60d7a8899c2c8ddec68850ec7e69c
Contents?: true
Size: 527 Bytes
Versions: 4
Compression:
Stored size: 527 Bytes
Contents
# frozen_string_literal: true module Cucumber # Defines the location and value of a captured argument from the step # text class StepArgument def self.arguments_from(regexp, step_name) match = regexp.match(step_name) if match n = 0 match.captures.map do |val| n += 1 offset = match.offset(n)[0] new(offset, val) end end end attr_reader :offset, :val def initialize(offset, val) @offset, @val = offset, val end end end
Version data entries
4 entries across 4 versions & 2 rubygems