Class: Hoss::Context::Request::Url Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hoss/context/request/url.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

SKIPPED_PORTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  'http' => 80,
  'https' => 443
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req) ⇒ Url

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Url.



32
33
34
35
36
37
38
39
40
# File 'lib/hoss/context/request/url.rb', line 32

def initialize(req)
  @protocol = req.scheme
  @hostname = req.host
  @port = req.port.to_s
  @pathname = req.path
  @search = req.query_string
  @hash = nil
  @full = build_full_url req
end

Instance Attribute Details

#fullObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def full
  @full
end

#hashObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def hash
  @hash
end

#hostnameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def hostname
  @hostname
end

#pathnameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def pathname
  @pathname
end

#portObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def port
  @port
end

#protocolObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def protocol
  @protocol
end

#searchObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



42
43
44
# File 'lib/hoss/context/request/url.rb', line 42

def search
  @search
end