Class: Cucumber::Core::Gherkin::AstBuilder::FeatureBuilder
- Defined in:
- lib/cucumber/core/gherkin/ast_builder.rb
Instance Attribute Summary collapse
-
#background_builder ⇒ Object
writeonly
Sets the attribute background_builder.
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #children ⇒ Object
-
#initialize ⇒ FeatureBuilder
constructor
A new instance of FeatureBuilder.
- #result(language) ⇒ Object
Constructor Details
#initialize ⇒ FeatureBuilder
Returns a new instance of FeatureBuilder.
114 115 116 117 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 114 def initialize(*) super @background_builder = nil end |
Instance Attribute Details
#background_builder=(value) ⇒ Object
Sets the attribute background_builder
111 112 113 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 111 def background_builder=(value) @background_builder = value end |
Instance Method Details
#add_child(child) ⇒ Object
135 136 137 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 135 def add_child(child) children << child end |
#children ⇒ Object
139 140 141 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 139 def children @children ||= [] end |
#result(language) ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 119 def result(language) background = background(language) Ast::Feature.new( node, language, location, background, comments, , node.keyword, node.name.lstrip, node.description.rstrip, children.map { |builder| builder.result(background, language, ) } ) end |