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
- #secure? ⇒ Boolean
- #value ⇒ Object
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
#domain ⇒ Object
15 16 17 |
# File 'lib/capybara/poltergeist/cookie.rb', line 15 def domain @attributes['domain'] end |
#expires ⇒ Object
31 32 33 |
# File 'lib/capybara/poltergeist/cookie.rb', line 31 def expires Time.at @attributes['expiry'] if @attributes['expiry'] end |
#httponly? ⇒ Boolean
27 28 29 |
# File 'lib/capybara/poltergeist/cookie.rb', line 27 def httponly? @attributes['httponly'] end |
#name ⇒ Object
7 8 9 |
# File 'lib/capybara/poltergeist/cookie.rb', line 7 def name @attributes['name'] end |
#path ⇒ Object
19 20 21 |
# File 'lib/capybara/poltergeist/cookie.rb', line 19 def path @attributes['path'] end |
#secure? ⇒ Boolean
23 24 25 |
# File 'lib/capybara/poltergeist/cookie.rb', line 23 def secure? @attributes['secure'] end |
#value ⇒ Object
11 12 13 |
# File 'lib/capybara/poltergeist/cookie.rb', line 11 def value @attributes['value'] end |