Class: Lucid::Parser::SpecBuilder::FeatureBuilder
- Inherits:
-
Spec
- Object
- Spec
- Lucid::Parser::SpecBuilder::FeatureBuilder
show all
- Defined in:
- lib/lucid/spec_builder.rb
Instance Method Summary
collapse
Methods inherited from Spec
#initialize
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
|
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,
,
tags,
node.keyword,
node.name.lstrip,
node.description.rstrip,
children.map { |builder| builder.result(background, language, tags) }
)
feature.gherkin_statement(node)
feature.language = language
feature
end
|