Class: AuthKeyCookie
Instance Attribute Summary collapse
-
#cookie_name ⇒ Object
Returns the value of attribute cookie_name.
-
#val ⇒ Object
Returns the value of attribute val.
Instance Method Summary collapse
- #add_auth(http_client, req_kwargs) ⇒ Object
-
#initialize(cookie_name: nil, val: nil) ⇒ AuthKeyCookie
constructor
A new instance of AuthKeyCookie.
Constructor Details
#initialize(cookie_name: nil, val: nil) ⇒ AuthKeyCookie
Returns a new instance of AuthKeyCookie.
116 117 118 119 |
# File 'lib/one_doc.rb', line 116 def initialize(cookie_name: nil, val: nil) @cookie_name = @val = val end |
Instance Attribute Details
#cookie_name ⇒ Object
Returns the value of attribute cookie_name.
114 115 116 |
# File 'lib/one_doc.rb', line 114 def @cookie_name end |
#val ⇒ Object
Returns the value of attribute val.
114 115 116 |
# File 'lib/one_doc.rb', line 114 def val @val end |
Instance Method Details
#add_auth(http_client, req_kwargs) ⇒ Object
121 122 123 124 125 126 127 |
# File 'lib/one_doc.rb', line 121 def add_auth(http_client, req_kwargs) if !@val.nil? http_client = http_client.(@cookie_name => @val) end return http_client, req_kwargs end |