Class: Cucumber::Core::Ast::Scenario

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

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes included from Names

#description

Instance Method Summary collapse

Methods included from DescribesItself

#describe_to

Methods included from HasLocation

#attributes, #file, #file_colon_line, #line, #match_locations?, #multiline_arg

Methods included from Names

#name, #to_s

Instance Attribute Details

#backgroundObject (readonly)

Returns the value of attribute background.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def background
  @background
end

#commentsObject (readonly)

Returns the value of attribute comments.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def comments
  @comments
end

#featureObject

Returns the value of attribute feature.



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

def feature
  @feature
end

#feature_tagsObject (readonly)

Returns the value of attribute feature_tags.



15
16
17
# File 'lib/cucumber/core/ast/scenario.rb', line 15

def feature_tags
  @feature_tags
end

#gherkin_statementObject (readonly)

Returns the value of attribute gherkin_statement.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def gherkin_statement
  @gherkin_statement
end

#keywordObject (readonly)

Returns the value of attribute keyword.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def keyword
  @keyword
end

#locationObject (readonly)

Returns the value of attribute location.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def location
  @location
end

#tagsObject (readonly)

Returns the value of attribute tags.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def tags
  @tags
end

#titleObject (readonly)

Returns the value of attribute title.



17
18
19
# File 'lib/cucumber/core/ast/scenario.rb', line 17

def title
  @title
end

Instance Method Details

#childrenObject



21
22
23
# File 'lib/cucumber/core/ast/scenario.rb', line 21

def children
  raw_steps
end

#to_sexpObject



25
26
27
28
29
30
31
32
33
# File 'lib/cucumber/core/ast/scenario.rb', line 25

def to_sexp
  sexp = [:scenario, line, keyword, name]
  comment = comment.to_sexp
  sexp += [comment] if comment
  tags = tags.to_sexp
  sexp += tags if tags.any?
  sexp += step_invocations.to_sexp if step_invocations.any?
  sexp
end