# File lib/highline/menu.rb, line 349
    def to_str(  )
      case @layout
      when :list
        '<%= if @header.nil? then '' else "#{@header}:\n" end %>' +
        "<%= list( @menu, #{@flow.inspect},
                          #{@list_option.inspect} ) %>" +
        "<%= @prompt %>"
      when :one_line
        '<%= if @header.nil? then '' else "#{@header}:  " end %>' +
        "<%= @prompt %>" +
        "(<%= list( @menu, #{@flow.inspect},
                           #{@list_option.inspect} ) %>)" +
        "<%= @prompt[/\s*$/] %>"
      when :menu_only
        "<%= list( @menu, #{@flow.inspect},
                          #{@list_option.inspect} ) %><%= @prompt %>"
      else
        @layout
      end
    end