Class: Capybara::Poltergeist::Cookie

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/poltergeist/cookie.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Cookie

Returns a new instance of Cookie.



5
6
7
# File 'lib/capybara/poltergeist/cookie.rb', line 5

def initialize(attributes)
  @attributes = attributes
end

Instance Method Details

#domainObject



17
18
19
# File 'lib/capybara/poltergeist/cookie.rb', line 17

def domain
  @attributes['domain']
end

#expiresObject



37
38
39
# File 'lib/capybara/poltergeist/cookie.rb', line 37

def expires
  Time.at @attributes['expiry'] if @attributes['expiry']
end

#httponly?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/capybara/poltergeist/cookie.rb', line 29

def httponly?
  @attributes['httponly']
end

#nameObject



9
10
11
# File 'lib/capybara/poltergeist/cookie.rb', line 9

def name
  @attributes['name']
end

#pathObject



21
22
23
# File 'lib/capybara/poltergeist/cookie.rb', line 21

def path
  @attributes['path']
end

#samesiteObject



33
34
35
# File 'lib/capybara/poltergeist/cookie.rb', line 33

def samesite
  @attributes['samesite']
end

#secure?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/capybara/poltergeist/cookie.rb', line 25

def secure?
  @attributes['secure']
end

#valueObject



13
14
15
# File 'lib/capybara/poltergeist/cookie.rb', line 13

def value
  @attributes['value']
end