lib/terminus/host.rb in terminus-0.3.0 vs lib/terminus/host.rb in terminus-0.4.0

- old
+ new

@@ -2,11 +2,16 @@ class Host attr_reader :host, :port def initialize(uri) - @host = uri.host - @port = uri.port + @scheme = uri.scheme if uri.respond_to?(:scheme) + @host = uri.host + @port = uri.port + end + + def scheme + @scheme || 'http' end def eql?(other) host == other.host and port == other.port