1
require 'gherkin/rubify'
5
module MultilineArgument
8
include Gherkin::Rubify
11
return unless argument
12
return argument if argument.respond_to?(:to_step_definition_arg)
14
case(rubify(argument))
16
# TODO: this duplicates work that gherkin does. We should really pass the string to gherkin and let it parse it.
17
Ast::DocString.new(argument, '')
18
when Gherkin::Formatter::Model::DocString
19
Ast::DocString.new(argument.value, argument.content_type)
21
Ast::Table.new(argument.map{|row| row.cells})
23
raise ArgumentError, "Don't know how to convert #{argument} into a MultilineArgument"