Class: Cucumber::Core::Gherkin::AstBuilder::DocStringBuilder
- Inherits:
-
Builder
- Object
- Builder
- Cucumber::Core::Gherkin::AstBuilder::DocStringBuilder
show all
- Defined in:
- lib/cucumber/core/gherkin/ast_builder.rb
Instance Method Summary
collapse
Methods inherited from Builder
#handle_comments, #initialize
Instance Method Details
#doc_string_location ⇒ Object
378
379
380
381
382
|
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 378
def doc_string_location
start_line = attributes[:location][:line]
end_line = start_line + attributes[:content].each_line.to_a.length + 1
Ast::Location.new(file, start_line..end_line)
end
|
#result ⇒ Object
370
371
372
373
374
375
376
|
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 370
def result
Ast::DocString.new(
attributes[:content],
attributes[:content_type],
doc_string_location
)
end
|