Class: Applitools::Connectivity::AutProxy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#domainsObject

Returns the value of attribute domains

Returns:

  • (Object)

    the current value of domains



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def domains
  @domains
end

#is_http_onlyObject

Returns the value of attribute is_http_only

Returns:

  • (Object)

    the current value of is_http_only



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def is_http_only
  @is_http_only
end

#modeObject

Returns the value of attribute mode

Returns:

  • (Object)

    the current value of mode



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def mode
  @mode
end

#passwordObject

Returns the value of attribute password

Returns:

  • (Object)

    the current value of password



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def password
  @password
end

#uriObject

Returns the value of attribute uri

Returns:

  • (Object)

    the current value of uri



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def uri
  @uri
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



28
29
30
# File 'lib/applitools/connectivity/proxy.rb', line 28

def user
  @user
end

Instance Method Details

#to_hashObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/applitools/connectivity/proxy.rb', line 29

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[:mode] = mode unless mode.nil?
  result[:domains] = domains unless domains.nil? || domains.empty?
  result
end