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
393
394
395
396
397
|
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 393
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
385
386
387
388
389
390
391
|
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 385
def result
Ast::DocString.new(
attributes[:content],
attributes[:content_type],
doc_string_location
)
end
|