Class: Cucumber::Core::Gherkin::AstBuilder::FeatureBuilder
- Defined in:
- lib/cucumber/core/gherkin/ast_builder.rb
Instance Attribute Summary collapse
-
#feature_element_builders ⇒ Object
readonly
Returns the value of attribute feature_element_builders.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
-
#initialize ⇒ FeatureBuilder
constructor
A new instance of FeatureBuilder.
- #result ⇒ Object
Methods inherited from Builder
Constructor Details
#initialize ⇒ FeatureBuilder
Returns a new instance of FeatureBuilder.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 123 def initialize(*) super @language = Ast::LanguageDelegator.new(attributes[:language], ::Gherkin::Dialect.for(attributes[:language])) @feature_element_builders = attributes[:children].map do |child| case child[:type] when :Background BackgroundBuilder.new(file, child) when :Scenario ScenarioBuilder.new(file, child) else ScenarioOutlineBuilder.new(file, child) end end end |
Instance Attribute Details
#feature_element_builders ⇒ Object (readonly)
Returns the value of attribute feature_element_builders.
121 122 123 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 121 def feature_element_builders @feature_element_builders end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
121 122 123 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 121 def language @language end |