Sha256: 95c5cb3b715d05bd3da497204ef37d6a2367c3dfe9f38dc07cdd7a587d515b89
Contents?: true
Size: 759 Bytes
Versions: 19
Compression:
Stored size: 759 Bytes
Contents
module Skylight module Formatters module HTTP def self.build_opts(method, scheme, host, port, path, query) category = "api.http.#{method.downcase}" title = "#{method.upcase} #{host || path}" description = "#{method.upcase} #{build_url(scheme, host, port, path, query)}" { category: category, title: title, description: description } end def self.build_url(scheme, host, port, path, query) url = '' if scheme url << "#{scheme}://" end if host url << host end if port url << ":#{port}" end url << path if query url << "?#{query}" end url end end end end
Version data entries
19 entries across 19 versions & 1 rubygems