Class: Akephalos::Client::Cookies::Cookie

Inherits:
Object
  • Object
show all
Defined in:
lib/akephalos/client/cookies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cookie) ⇒ Cookie

Returns a new instance of Cookie.

Parameters:

  • the (HtmlUnit::Cookie)

    cookie



50
51
52
53
54
55
56
57
58
# File 'lib/akephalos/client/cookies.rb', line 50

def initialize(cookie)
  @_cookie = cookie
  @domain = cookie.getDomain
  @expires = cookie.getExpires
  @name = cookie.getName
  @path = cookie.getPath
  @value = cookie.getValue
  @secure = cookie.isSecure
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



47
48
49
# File 'lib/akephalos/client/cookies.rb', line 47

def domain
  @domain
end

#expiresObject (readonly)

Returns the value of attribute expires.



47
48
49
# File 'lib/akephalos/client/cookies.rb', line 47

def expires
  @expires
end

#nameObject (readonly)

Returns the value of attribute name.



47
48
49
# File 'lib/akephalos/client/cookies.rb', line 47

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



47
48
49
# File 'lib/akephalos/client/cookies.rb', line 47

def path
  @path
end

#valueObject (readonly)

Returns the value of attribute value.



47
48
49
# File 'lib/akephalos/client/cookies.rb', line 47

def value
  @value
end

Instance Method Details

#nativeHtmlUnit::Cookie

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the native cookie object.

Returns:

  • (HtmlUnit::Cookie)

    the native cookie object



66
67
68
# File 'lib/akephalos/client/cookies.rb', line 66

def native
  @_cookie
end

#secure?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/akephalos/client/cookies.rb', line 60

def secure?
  !!@secure
end