Class: Applitools::Connectivity::Proxy

Inherits:
Struct
  • Object
show all
Defined in:
lib/applitools/connectivity/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#is_http_onlyObject

Returns the value of attribute is_http_only

Returns:

  • (Object)

    the current value of is_http_only



4
5
6
# File 'lib/applitools/connectivity/proxy.rb', line 4

def is_http_only
  @is_http_only
end

#passwordObject

Returns the value of attribute password

Returns:

  • (Object)

    the current value of password



4
5
6
# File 'lib/applitools/connectivity/proxy.rb', line 4

def password
  @password
end

#uriObject

Returns the value of attribute uri

Returns:

  • (Object)

    the current value of uri



4
5
6
# File 'lib/applitools/connectivity/proxy.rb', line 4

def uri
  @uri
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



4
5
6
# File 'lib/applitools/connectivity/proxy.rb', line 4

def user
  @user
end

Instance Method Details

#to_hashObject

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