Class: Capybara::Cuprite::Cookie
- Inherits:
-
Object
- Object
- Capybara::Cuprite::Cookie
- Defined in:
- lib/capybara/cuprite/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
- #session? ⇒ Boolean
- #size ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Cookie
Returns a new instance of Cookie.
5 6 7 |
# File 'lib/capybara/cuprite/cookie.rb', line 5 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#domain ⇒ Object
17 18 19 |
# File 'lib/capybara/cuprite/cookie.rb', line 17 def domain @attributes["domain"] end |
#expires ⇒ Object
41 42 43 44 45 |
# File 'lib/capybara/cuprite/cookie.rb', line 41 def expires if @attributes["expires"] > 0 Time.at(@attributes["expires"]) end end |
#httponly? ⇒ Boolean
33 34 35 |
# File 'lib/capybara/cuprite/cookie.rb', line 33 def httponly? @attributes["httpOnly"] end |
#name ⇒ Object
9 10 11 |
# File 'lib/capybara/cuprite/cookie.rb', line 9 def name @attributes["name"] end |
#path ⇒ Object
21 22 23 |
# File 'lib/capybara/cuprite/cookie.rb', line 21 def path @attributes["path"] end |
#secure? ⇒ Boolean
29 30 31 |
# File 'lib/capybara/cuprite/cookie.rb', line 29 def secure? @attributes["secure"] end |
#session? ⇒ Boolean
37 38 39 |
# File 'lib/capybara/cuprite/cookie.rb', line 37 def session? @attributes["session"] end |
#size ⇒ Object
25 26 27 |
# File 'lib/capybara/cuprite/cookie.rb', line 25 def size @attributes["size"] end |
#value ⇒ Object
13 14 15 |
# File 'lib/capybara/cuprite/cookie.rb', line 13 def value @attributes["value"] end |