Class: Atatus::Context::Request::Url Private
- Inherits:
-
Object
- Object
- Atatus::Context::Request::Url
- Defined in:
- lib/atatus/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
- #full ⇒ Object readonly private
- #hash ⇒ Object readonly private
- #hostname ⇒ Object readonly private
- #pathname ⇒ Object readonly private
- #port ⇒ Object readonly private
- #protocol ⇒ Object readonly private
- #search ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(req) ⇒ Url
constructor
private
A new instance of Url.
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/atatus/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
#full ⇒ Object (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/atatus/context/request/url.rb', line 42 def full @full end |
#hash ⇒ Object (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/atatus/context/request/url.rb', line 42 def hash @hash end |
#hostname ⇒ Object (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/atatus/context/request/url.rb', line 42 def hostname @hostname end |
#pathname ⇒ Object (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/atatus/context/request/url.rb', line 42 def pathname @pathname end |
#port ⇒ Object (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/atatus/context/request/url.rb', line 42 def port @port end |
#protocol ⇒ Object (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/atatus/context/request/url.rb', line 42 def protocol @protocol end |
#search ⇒ Object (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/atatus/context/request/url.rb', line 42 def search @search end |