Class: Puppet::Network::HTTP::Session Private
- Defined in:
- lib/puppet/network/http/session.rb
Overview
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.
An HTTP session that references a persistent HTTP connection and an expiration time for the connection.
Instance Attribute Summary collapse
- #connection ⇒ Object readonly private
Instance Method Summary collapse
- #expired?(now) ⇒ Boolean private
-
#initialize(connection, expiration_time) ⇒ Session
constructor
private
A new instance of Session.
Constructor Details
#initialize(connection, expiration_time) ⇒ Session
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 Session.
9 10 11 12 |
# File 'lib/puppet/network/http/session.rb', line 9 def initialize(connection, expiration_time) @connection = connection @expiration_time = expiration_time end |
Instance Attribute Details
#connection ⇒ 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.
7 8 9 |
# File 'lib/puppet/network/http/session.rb', line 7 def connection @connection end |
Instance Method Details
#expired?(now) ⇒ Boolean
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.
14 15 16 |
# File 'lib/puppet/network/http/session.rb', line 14 def expired?(now) @expiration_time <= now end |