Class: Cucumber::Core::Ast::OutlineStep

Inherits:
Object
  • Object
show all
Includes:
DescribesItself, HasLocation
Defined in:
lib/cucumber/core/ast/outline_step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DescribesItself

#describe_to

Methods included from HasLocation

#all_locations, #attributes, #file, #file_colon_line, #line, #tags

Constructor Details

#initialize(language, location, comments, keyword, text, multiline_arg) ⇒ OutlineStep

Returns a new instance of OutlineStep.



16
17
18
# File 'lib/cucumber/core/ast/outline_step.rb', line 16

def initialize(language, location, comments, keyword, text, multiline_arg)
  @language, @location, @comments, @keyword, @name, @multiline_arg = language, location, comments, keyword, text, multiline_arg
end

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def comments
  @comments
end

#keywordObject (readonly)

Returns the value of attribute keyword.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def keyword
  @keyword
end

#languageObject (readonly)

Returns the value of attribute language.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def language
  @language
end

#locationObject (readonly)

Returns the value of attribute location.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def location
  @location
end

#multiline_argObject (readonly)

Returns the value of attribute multiline_arg.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def multiline_arg
  @multiline_arg
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/cucumber/core/ast/outline_step.rb', line 14

def name
  @name
end

Instance Method Details

#inspectObject



24
25
26
27
# File 'lib/cucumber/core/ast/outline_step.rb', line 24

def inspect
  keyword_and_name = [keyword, name].join(": ")
  %{#<#{self.class} "#{keyword_and_name}" (#{location})>}
end

#to_step(row) ⇒ Object



20
21
22
# File 'lib/cucumber/core/ast/outline_step.rb', line 20

def to_step(row)
  Ast::ExpandedOutlineStep.new(self, language, row.location, comments, keyword, row.expand(name), replace_multiline_arg(row))
end