class Cucumber::Core::Ast::Step
Attributes
comments[R]
exception[R]
keyword[R]
language[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/step.rb, line 14 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
actual_keyword(previous_step_keyword = nil)
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 26 def actual_keyword(previous_step_keyword = nil) if [language.and_keywords, language.but_keywords].flatten.uniq.include? keyword if previous_step_keyword.nil? language.given_keywords.reject{|kw| kw == '* '}[0] else previous_step_keyword end else keyword end end
backtrace_line()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 22 def backtrace_line "#{location}:in `#{keyword}#{text}'" end
inspect()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 42 def inspect keyword_and_text = [keyword, text].join(": ") %{#<#{self.class} "#{keyword_and_text}" (#{location})>} end
original_location()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 38 def original_location location end
to_s()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 18 def to_s text end
Private Instance Methods
children()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 50 def children [@multiline_arg] end
description_for_visitors()
click to toggle source
# File lib/cucumber/core/ast/step.rb, line 54 def description_for_visitors :step end