Class: Autility::Cookie

Inherits:
Struct
  • Object
show all
Defined in:
lib/autility/cookie.rb

Overview

Public: Represents a browser cookie.

Examples

cookie = Cookie.new("JSESSIONID", "123")
cookie.to_command
# => "--cookie \"JSESSIONID=123\""

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/autility/cookie.rb', line 10

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



10
11
12
# File 'lib/autility/cookie.rb', line 10

def value
  @value
end

Instance Method Details

#to_commandObject

Public: Converts the cookie to a cURL option.

Returns the String cURL option.



14
15
16
# File 'lib/autility/cookie.rb', line 14

def to_command
  %Q(--cookie "#{name}=#{value}")
end