class Cucumber::Core::Ast::OutlineStep

Attributes

comments[R]
keyword[R]
language[R]
location[R]
multiline_arg[R]
text[R]

Public Class Methods

new(language, location, comments, keyword, text, multiline_arg) click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 15
def initialize(language, location, comments, keyword, text, multiline_arg)
  @language, @location, @comments, @keyword, @text, @multiline_arg = language, location, comments, keyword, text, multiline_arg
end

Public Instance Methods

inspect() click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 27
def inspect
  keyword_and_text = [keyword, text].join(": ")
  %{#<#{self.class} "#{keyword_and_text}" (#{location})>}
end
to_s() click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 23
def to_s
  text
end
to_step(row) click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 19
def to_step(row)
  Ast::ExpandedOutlineStep.new(self, language, row.location, comments, keyword, row.expand(text), replace_multiline_arg(row))
end

Private Instance Methods

children() click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 38
def children
  # TODO remove duplication with Step
  # TODO spec
  [@multiline_arg]
end
description_for_visitors() click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 34
def description_for_visitors
  :outline_step
end
replace_multiline_arg(example_row) click to toggle source
# File lib/cucumber/core/ast/outline_step.rb, line 44
def replace_multiline_arg(example_row)
  return unless multiline_arg
  multiline_arg.map { |cell| example_row.expand(cell) }
end