Class: Aquatone::UrlMaker
- Inherits:
-
Object
- Object
- Aquatone::UrlMaker
- Defined in:
- lib/aquatone/url_maker.rb
Constant Summary collapse
- SSL_PORTS =
[443, 832, 981, 1010, 1311, 2083, 2087, 2095, 2096, 4712, 7000, 8172, 8243, 8333, 8443, 8834, 9443, 12443, 18091, 18092].freeze
Class Method Summary collapse
Class Method Details
.make(host, port) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/aquatone/url_maker.rb', line 6 def self.make(host, port) case port when 80 "http://#{host}/" when 443 "https://#{host}/" else if ssl_port?(port) "https://#{host}:#{port}/" else "http://#{host}:#{port}/" end end end |