Class: Cucumber::Core::Gherkin::AstBuilder::FeatureBuilder
- Defined in:
- lib/cucumber/core/gherkin/ast_builder.rb
Instance Attribute Summary collapse
-
#background_builder ⇒ Object
readonly
Returns the value of attribute background_builder.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#scenario_definition_builders ⇒ Object
readonly
Returns the value of attribute scenario_definition_builders.
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.
100 101 102 103 104 105 106 107 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 100 def initialize(*) super @language = Ast::LanguageDelegator.new(attributes[:language], ::Gherkin::Dialect.for(attributes[:language])) @background_builder = BackgroundBuilder.new(file, attributes[:background]) if attributes[:background] @scenario_definition_builders = attributes[:scenario_definitions].map do |sd| sd[:type] == :Scenario ? ScenarioBuilder.new(file, sd) : ScenarioOutlineBuilder.new(file, sd) end end |
Instance Attribute Details
#background_builder ⇒ Object (readonly)
Returns the value of attribute background_builder.
98 99 100 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 98 def background_builder @background_builder end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
98 99 100 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 98 def language @language end |
#scenario_definition_builders ⇒ Object (readonly)
Returns the value of attribute scenario_definition_builders.
98 99 100 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 98 def scenario_definition_builders @scenario_definition_builders end |