def link(*urls)
      opts          = urls.last.respond_to?(:to_hash) ? urls.pop : {}
      opts[:rel]    = urls.shift unless urls.first.respond_to? :to_str
      options       = opts.map { |k, v| " #{k}=#{v.to_s.inspect}" }
      html_pattern  = "<link href=\"%s\"#{options.join} />"
      http_pattern  = ["<%s>", *options].join ";"
      link          = (response["Link"] ||= "")

      urls.map do |url|
        link << ",\n" unless link.empty?
        link << (http_pattern % url)
        html_pattern % url
      end.join "\n"
    end
def link(*urls)
      opts          = urls.last.respond_to?(:to_hash) ? urls.pop : {}
      opts[:rel]    = urls.shift unless urls.first.respond_to? :to_str
      options       = opts.map { |k, v| " #{k}=#{v.to_s.inspect}" }
      html_pattern  = "<link href=\"%s\"#{options.join} />"
      http_pattern  = ["<%s>", *options].join ";"
      link          = (response["Link"] ||= "")

      urls.map do |url|
        link << ",\n" unless link.empty?
        link << (http_pattern % url)
        html_pattern % url
      end.join "\n"
    end
Sets Link HTTP header and returns corresponding HTML tags.

 Example:

   # Sets header:
   #   Link: </foo>; rel="next"
   # Returns String:
   #   '<link href="/foo" rel="next" />'
   link '/foo', :rel => :next

   # Multiple URLs
   link :stylesheet, '/a.css', '/b.css'