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.



3
4
5
# File 'lib/capybara/poltergeist/cookie.rb', line 3

def initialize(attributes)
  @attributes = attributes
end

Instance Method Details

#domainObject



15
16
17
# File 'lib/capybara/poltergeist/cookie.rb', line 15

def domain
  @attributes['domain']
end

#expiresObject



31
32
33
# File 'lib/capybara/poltergeist/cookie.rb', line 31

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

#httponly?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/capybara/poltergeist/cookie.rb', line 27

def httponly?
  @attributes['httponly']
end

#nameObject



7
8
9
# File 'lib/capybara/poltergeist/cookie.rb', line 7

def name
  @attributes['name']
end

#pathObject



19
20
21
# File 'lib/capybara/poltergeist/cookie.rb', line 19

def path
  @attributes['path']
end

#secure?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/capybara/poltergeist/cookie.rb', line 23

def secure?
  @attributes['secure']
end

#valueObject



11
12
13
# File 'lib/capybara/poltergeist/cookie.rb', line 11

def value
  @attributes['value']
end