Class: Lucid::Parser::SpecBuilder::FeatureBuilder
- Defined in:
- lib/lucid/spec_builder.rb
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #background_builder=(builder) ⇒ Object
- #children ⇒ Object
- #result(language) ⇒ Object
Methods inherited from Spec
Constructor Details
This class inherits a constructor from Lucid::Parser::SpecBuilder::Spec
Instance Method Details
#add_child(child) ⇒ Object
153 154 155 |
# File 'lib/lucid/spec_builder.rb', line 153 def add_child(child) children << child end |
#background_builder=(builder) ⇒ Object
149 150 151 |
# File 'lib/lucid/spec_builder.rb', line 149 def background_builder=(builder) @background_builder = builder end |
#children ⇒ Object
157 158 159 |
# File 'lib/lucid/spec_builder.rb', line 157 def children @children ||= [] end |
#result(language) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/lucid/spec_builder.rb', line 132 def result(language) background = background(language) feature = Lucid::AST::Feature.new( location, background, comment, , node.keyword, node.name.lstrip, node.description.rstrip, children.map { |builder| builder.result(background, language, ) } ) feature.gherkin_statement(node) feature.language = language feature end |