Class: ElasticAPM::Context::Request::Socket Private
- Inherits:
-
Object
- Object
- ElasticAPM::Context::Request::Socket
- Defined in:
- lib/elastic_apm/context/request/socket.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.
Instance Attribute Summary collapse
- #encrypted ⇒ Object readonly private
- #remote_addr ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(req) ⇒ Socket
constructor
private
A new instance of Socket.
Constructor Details
#initialize(req) ⇒ Socket
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 Socket.
10 11 12 13 |
# File 'lib/elastic_apm/context/request/socket.rb', line 10 def initialize(req) @remote_addr = req.ip @encrypted = req.scheme == 'https' end |
Instance Attribute Details
#encrypted ⇒ 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.
15 16 17 |
# File 'lib/elastic_apm/context/request/socket.rb', line 15 def encrypted @encrypted end |
#remote_addr ⇒ 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.
15 16 17 |
# File 'lib/elastic_apm/context/request/socket.rb', line 15 def remote_addr @remote_addr end |