Class: Gherkin::AST::Feature
- Includes:
- Enumerable
- Defined in:
- lib/gherkin/ast.rb
Instance Attribute Summary collapse
-
#background ⇒ Object
readonly
Returns the value of attribute background.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scenarios ⇒ Object
readonly
Returns the value of attribute scenarios.
Attributes inherited from Node
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(name, scenarios = [], background = nil) ⇒ Feature
constructor
A new instance of Feature.
Methods inherited from Node
Constructor Details
#initialize(name, scenarios = [], background = nil) ⇒ Feature
Returns a new instance of Feature.
17 18 19 20 21 22 23 |
# File 'lib/gherkin/ast.rb', line 17 def initialize(name, scenarios=[], background=nil) @line, @column = name.line_and_column @name = name.to_s @background = background @scenarios = scenarios end |
Instance Attribute Details
#background ⇒ Object (readonly)
Returns the value of attribute background.
13 14 15 |
# File 'lib/gherkin/ast.rb', line 13 def background @background end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/gherkin/ast.rb', line 13 def name @name end |
#scenarios ⇒ Object (readonly)
Returns the value of attribute scenarios.
13 14 15 |
# File 'lib/gherkin/ast.rb', line 13 def scenarios @scenarios end |
Instance Method Details
#each ⇒ Object
25 26 27 |
# File 'lib/gherkin/ast.rb', line 25 def each @scenarios.each end |