Class: Applitools::Connectivity::Proxy
- Inherits:
-
Struct
- Object
- Struct
- Applitools::Connectivity::Proxy
- Defined in:
- lib/applitools/connectivity/proxy.rb
Instance Attribute Summary collapse
-
#is_http_only ⇒ Object
Returns the value of attribute is_http_only.
-
#password ⇒ Object
Returns the value of attribute password.
-
#uri ⇒ Object
Returns the value of attribute uri.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#to_hash ⇒ Object
export type Proxy = { url: string username?: string password?: string isHttpOnly?: boolean }.
Instance Attribute Details
#is_http_only ⇒ Object
Returns the value of attribute is_http_only
4 5 6 |
# File 'lib/applitools/connectivity/proxy.rb', line 4 def is_http_only @is_http_only end |
#password ⇒ Object
Returns the value of attribute password
4 5 6 |
# File 'lib/applitools/connectivity/proxy.rb', line 4 def password @password end |
#uri ⇒ Object
Returns the value of attribute uri
4 5 6 |
# File 'lib/applitools/connectivity/proxy.rb', line 4 def uri @uri end |
#user ⇒ Object
Returns the value of attribute user
4 5 6 |
# File 'lib/applitools/connectivity/proxy.rb', line 4 def user @user end |
Instance Method Details
#to_hash ⇒ Object
export type Proxy =
url: string
username?: string
password?: string
isHttpOnly?: boolean
11 12 13 14 15 16 17 18 |
# File 'lib/applitools/connectivity/proxy.rb', line 11 def to_hash result = {} result[:url] = uri.is_a?(String) ? uri : uri.to_s result[:username] = user unless user.nil? result[:password] = password unless password.nil? result[:isHttpOnly] = !!is_http_only unless is_http_only.nil? result end |