Class: StackifyRubyAPM::Context::Request::Url Private

Inherits:
Object
  • Object
show all
Includes:
NaivelyHashable
Defined in:
lib/stackify_apm/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

Methods included from NaivelyHashable

#naively_hashable?, #to_h

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.



17
18
19
20
21
22
23
24
25
# File 'lib/stackify_apm/context/request/url.rb', line 17

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

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.



27
28
29
# File 'lib/stackify_apm/context/request/url.rb', line 27

def search
  @search
end