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

#domains ⇒ Object

Returns the value of attribute domains



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

def domains
  @domains
end

#is_http_only ⇒ Object

Returns the value of attribute is_http_only



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

def is_http_only
  @is_http_only
end

#mode ⇒ Object

Returns the value of attribute mode



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

def mode
  @mode
end

#password ⇒ Object

Returns the value of attribute password



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

def password
  @password
end

#uri ⇒ Object

Returns the value of attribute uri



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

def uri
  @uri
end

#user ⇒ Object

Returns the value of attribute user



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

def user
  @user
end

Instance Method Details

#to_hash ⇒ Object



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