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.
111 112 113 114 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 111 def initialize(*) super @background_builder = nil end |
Instance Attribute Details
#background_builder=(value) ⇒ Object
Sets the attribute background_builder
108 109 110 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 108 def background_builder=(value) @background_builder = value end |
Instance Method Details
#add_child(child) ⇒ Object
133 134 135 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 133 def add_child(child) children << child end |
#children ⇒ Object
137 138 139 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 137 def children @children ||= [] end |
#result(language) ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 116 def result(language) background = background(language) feature = Ast::Feature.new( location, background, comments, , node.keyword, node.name.lstrip, node.description.rstrip, children.map { |builder| builder.result(background, language, ) } ) feature.gherkin_statement(node) feature.language = language feature end |