Class: Capybara::Cuprite::Cookie

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Cookie

Returns a new instance of Cookie.



6
7
8
# File 'lib/capybara/cuprite/cookie.rb', line 6

def initialize(attributes)
  @attributes = attributes
end

Instance Method Details

#domainObject



18
19
20
# File 'lib/capybara/cuprite/cookie.rb', line 18

def domain
  @attributes["domain"]
end

#expiresObject



42
43
44
# File 'lib/capybara/cuprite/cookie.rb', line 42

def expires
  Time.at(@attributes["expires"]) if (@attributes["expires"]).positive?
end

#httponly?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/capybara/cuprite/cookie.rb', line 34

def httponly?
  @attributes["httpOnly"]
end

#nameObject



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

def name
  @attributes["name"]
end

#pathObject



22
23
24
# File 'lib/capybara/cuprite/cookie.rb', line 22

def path
  @attributes["path"]
end

#secure?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/capybara/cuprite/cookie.rb', line 30

def secure?
  @attributes["secure"]
end

#session?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/capybara/cuprite/cookie.rb', line 38

def session?
  @attributes["session"]
end

#sizeObject



26
27
28
# File 'lib/capybara/cuprite/cookie.rb', line 26

def size
  @attributes["size"]
end

#valueObject



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

def value
  @attributes["value"]
end