Class: Cucumber::Core::Ast::Scenario
- Inherits:
-
Object
- Object
- Cucumber::Core::Ast::Scenario
- Includes:
- DescribesItself, HasLocation, Names
- Defined in:
- lib/cucumber/core/ast/scenario.rb
Instance Attribute Summary collapse
-
#background ⇒ Object
readonly
Returns the value of attribute background.
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Attributes included from Names
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(location, comments, tags, keyword, name, description, steps) ⇒ Scenario
constructor
A new instance of Scenario.
- #to_sexp ⇒ Object
Methods included from DescribesItself
Methods included from HasLocation
#all_locations, #attributes, #file, #file_colon_line, #line, #multiline_arg
Methods included from Names
#inspect, #legacy_conflated_name_and_description, #to_s
Constructor Details
#initialize(location, comments, tags, keyword, name, description, steps) ⇒ Scenario
Returns a new instance of Scenario.
19 20 21 22 23 24 25 26 27 |
# File 'lib/cucumber/core/ast/scenario.rb', line 19 def initialize(location, comments, , keyword, name, description, steps) @location = location @comments = comments @tags = @keyword = keyword @name = name @description = description @raw_steps = steps end |
Instance Attribute Details
#background ⇒ Object (readonly)
Returns the value of attribute background.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def background @background end |
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def comments @comments end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def description @description end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def keyword @keyword end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def location @location end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def @tags end |
Instance Method Details
#children ⇒ Object
29 30 31 |
# File 'lib/cucumber/core/ast/scenario.rb', line 29 def children raw_steps end |
#to_sexp ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/cucumber/core/ast/scenario.rb', line 33 def to_sexp sexp = [:scenario, line, keyword, name] comment = comment.to_sexp sexp += [comment] if comment = .to_sexp sexp += if .any? sexp += step_invocations.to_sexp if step_invocations.any? sexp end |