module Cucumber::MultilineArgument

def from(argument, location=nil)

def from(argument, location=nil)
  location ||= Core::Ast::Location.of_caller
  case argument
  when String
    doc_string(argument, 'text/plain', location)
  when Array
    location = location.on_line(argument.first.line..argument.last.line)
    data_table(argument.map{ |row| row.cells }, location)
  when DataTable, DocString, None
    argument
  when nil
    None.new
  else
    raise ArgumentError, "Don't know how to convert #{argument.class} #{argument.inspect} into a MultilineArgument"
  end
end