Class: Capybara::Poltergeist::Cookie
- Inherits:
-
Object
- Object
- Capybara::Poltergeist::Cookie
- Defined in:
- lib/capybara/poltergeist/cookie.rb
Instance Method Summary collapse
- #domain ⇒ Object
- #expires ⇒ Object
- #httponly? ⇒ Boolean
-
#initialize(attributes) ⇒ Cookie
constructor
A new instance of Cookie.
- #name ⇒ Object
- #path ⇒ Object
- #samesite ⇒ Object
- #secure? ⇒ Boolean
- #value ⇒ Object
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
#domain ⇒ Object
17 18 19 |
# File 'lib/capybara/poltergeist/cookie.rb', line 17 def domain @attributes['domain'] end |
#expires ⇒ Object
37 38 39 |
# File 'lib/capybara/poltergeist/cookie.rb', line 37 def expires Time.at @attributes['expiry'] if @attributes['expiry'] end |
#httponly? ⇒ Boolean
29 30 31 |
# File 'lib/capybara/poltergeist/cookie.rb', line 29 def httponly? @attributes['httponly'] end |
#name ⇒ Object
9 10 11 |
# File 'lib/capybara/poltergeist/cookie.rb', line 9 def name @attributes['name'] end |
#path ⇒ Object
21 22 23 |
# File 'lib/capybara/poltergeist/cookie.rb', line 21 def path @attributes['path'] end |
#samesite ⇒ Object
33 34 35 |
# File 'lib/capybara/poltergeist/cookie.rb', line 33 def samesite @attributes['samesite'] end |
#secure? ⇒ Boolean
25 26 27 |
# File 'lib/capybara/poltergeist/cookie.rb', line 25 def secure? @attributes['secure'] end |
#value ⇒ Object
13 14 15 |
# File 'lib/capybara/poltergeist/cookie.rb', line 13 def value @attributes['value'] end |