def compose(line)
      raise ArgumentError, "You must specify a command" if !line.command
      raw_line = ''
      raw_line << ":#{line.prefix} " if line.prefix
      raw_line << line.command

      if line.args
        line.args.each_with_index do |arg, idx|
          raw_line << ' '
          if idx != line.args.count-1 and arg.match(@@space)
            raise ArgumentError, "Only the last argument may contain spaces"
          end
          if idx == line.args.count-1
            raw_line << ':' if arg.match(@@space)
          end
          raw_line << arg
        end
      end

      return raw_line
    end
def compose(line)
      raise ArgumentError, "You must specify a command" if !line.command
      raw_line = ''
      raw_line << ":#{line.prefix} " if line.prefix
      raw_line << line.command

      if line.args
        line.args.each_with_index do |arg, idx|
          raw_line << ' '
          if idx != line.args.count-1 and arg.match(@@space)
            raise ArgumentError, "Only the last argument may contain spaces"
          end
          if idx == line.args.count-1
            raw_line << ':' if arg.match(@@space)
          end
          raw_line << arg
        end
      end

      return raw_line
    end
Compose an IRC protocol line.
 @param [IRCSupport::Line] line An IRC protocol line object
   (as returned by {#decompose}).
 @return [String] An IRC protocol line.