Class: Ethon::Easy
- Inherits:
-
Object
- Object
- Ethon::Easy
- Defined in:
- lib/cybersource_rest_client/ethon_extensions.rb
Instance Method Summary collapse
- #max_connection_age ⇒ Object
-
#max_connection_age=(value) ⇒ Object
Add alias methods.
-
#maxage_conn ⇒ Object
Add the maxage_conn getter method.
-
#maxage_conn=(value) ⇒ Object
Add the maxage_conn setter method - it will get call from set_attributes(options) from http actionable in ethon lib.
Instance Method Details
#max_connection_age ⇒ Object
34 35 36 |
# File 'lib/cybersource_rest_client/ethon_extensions.rb', line 34 def max_connection_age @maxage_conn end |
#max_connection_age=(value) ⇒ Object
Add alias methods
30 31 32 |
# File 'lib/cybersource_rest_client/ethon_extensions.rb', line 30 def max_connection_age=(value) self.maxage_conn = value end |
#maxage_conn ⇒ Object
Add the maxage_conn getter method
25 26 27 |
# File 'lib/cybersource_rest_client/ethon_extensions.rb', line 25 def maxage_conn @maxage_conn end |
#maxage_conn=(value) ⇒ Object
Add the maxage_conn setter method - it will get call from set_attributes(options) from http actionable in ethon lib.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cybersource_rest_client/ethon_extensions.rb', line 13 def maxage_conn=(value) return if value.nil? @maxage_conn = value.to_i # CURLOPT_MAXAGE_CONN = CURLOPTTYPE_LONG + 288 # CURLOPTTYPE_LONG = 0, so the option value is 0 + 288 = 288 curl_option = 288 # Call curl directly using Ethon::Curl.easy_setopt Ethon::Curl.easy_setopt(@handle, curl_option, :long, @maxage_conn) end |