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.
-
#feature_tags ⇒ Object
readonly
Returns the value of attribute feature_tags.
-
#gherkin_statement ⇒ Object
readonly
Returns the value of attribute gherkin_statement.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(gherkin_statement, language, location, background, comments, tags, feature_tags, keyword, title, description, raw_steps) ⇒ Scenario
constructor
A new instance of Scenario.
- #to_sexp ⇒ Object
Methods included from DescribesItself
Methods included from HasLocation
#attributes, #file, #file_colon_line, #line, #match_locations?, #multiline_arg
Methods included from Names
#inspect, #legacy_conflated_name_and_description, #name, #to_s
Constructor Details
#initialize(gherkin_statement, language, location, background, comments, tags, feature_tags, keyword, title, description, raw_steps) ⇒ Scenario
Returns a new instance of Scenario.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cucumber/core/ast/scenario.rb', line 19 def initialize(gherkin_statement, language, location, background, comments, , , keyword, title, description, raw_steps) @gherkin_statement = gherkin_statement @language = language @location = location @background = background @comments = comments @tags = @feature_tags = @keyword = keyword @title = title @description = description @raw_steps = raw_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 |
#feature_tags ⇒ Object (readonly)
Returns the value of attribute feature_tags.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def @feature_tags end |
#gherkin_statement ⇒ Object (readonly)
Returns the value of attribute gherkin_statement.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def gherkin_statement @gherkin_statement 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 |
#language ⇒ Object (readonly)
Returns the value of attribute language.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def language @language 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 |
#title ⇒ Object (readonly)
Returns the value of attribute title.
14 15 16 |
# File 'lib/cucumber/core/ast/scenario.rb', line 14 def title @title end |
Instance Method Details
#children ⇒ Object
33 34 35 |
# File 'lib/cucumber/core/ast/scenario.rb', line 33 def children raw_steps end |
#to_sexp ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/cucumber/core/ast/scenario.rb', line 37 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 |