Sha256: 3d3abce8960d03e65d0293707c97fdb0784ee3086605e9f5ff852d02184b99fd
Contents?: true
Size: 1.3 KB
Versions: 2
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true require 'cucumber/core/ast/location' require 'cucumber/core/ast/describes_itself' require 'cucumber/core/ast/step' module Cucumber module Core module Ast class OutlineStep include HasLocation include DescribesItself attr_reader :language, :location, :comments, :keyword, :name, :multiline_arg def initialize(language, location, comments, keyword, text, multiline_arg) @language, @location, @comments, @keyword, @name, @multiline_arg = language, location, comments, keyword, text, multiline_arg end def to_step(row) Ast::ExpandedOutlineStep.new(self, language, row.location, comments, keyword, row.expand(name), replace_multiline_arg(row)) end def inspect keyword_and_name = [keyword, name].join(": ") %{#<#{self.class} "#{keyword_and_name}" (#{location})>} end private def description_for_visitors :outline_step end def children # TODO remove duplication with Step # TODO spec [@multiline_arg] end def replace_multiline_arg(example_row) return unless multiline_arg multiline_arg.map { |cell| example_row.expand(cell) } end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-core-3.0.0.pre.2 | lib/cucumber/core/ast/outline_step.rb |
cucumber-core-2.0.0 | lib/cucumber/core/ast/outline_step.rb |