Class: Lucid::Parser::TDLBuilder::FeatureBuilder
Instance Method Summary
collapse
Methods inherited from Builder
#initialize
Instance Method Details
#add_child(child) ⇒ Object
149
150
151
|
# File 'lib/lucid/tdl_builder.rb', line 149
def add_child(child)
children << child
end
|
#background_builder=(builder) ⇒ Object
145
146
147
|
# File 'lib/lucid/tdl_builder.rb', line 145
def background_builder=(builder)
@background_builder = builder
end
|
153
154
155
|
# File 'lib/lucid/tdl_builder.rb', line 153
def children
@children ||= []
end
|
#result(language) ⇒ Object
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# File 'lib/lucid/tdl_builder.rb', line 128
def result(language)
background = background(language)
feature = 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
|