Sha256: 230799f420b57bae35a6c9b5b88520c58d029ba64764b610512cd5aa44e2a615
Contents?: true
Size: 519 Bytes
Versions: 10
Compression:
Stored size: 519 Bytes
Contents
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 else nil end end attr_reader :offset, :val def initialize(offset, val) @offset, @val = offset, val end end end
Version data entries
10 entries across 10 versions & 2 rubygems