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.
6 7 8 |
# File 'lib/capybara/cuprite/cookie.rb', line 6 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#domain ⇒ Object
18 19 20 |
# File 'lib/capybara/cuprite/cookie.rb', line 18 def domain @attributes["domain"] end |
#expires ⇒ Object
42 43 44 |
# File 'lib/capybara/cuprite/cookie.rb', line 42 def expires Time.at(@attributes["expires"]) if (@attributes["expires"]).positive? end |
#httponly? ⇒ Boolean
34 35 36 |
# File 'lib/capybara/cuprite/cookie.rb', line 34 def httponly? @attributes["httpOnly"] end |
#name ⇒ Object
10 11 12 |
# File 'lib/capybara/cuprite/cookie.rb', line 10 def name @attributes["name"] end |
#path ⇒ Object
22 23 24 |
# File 'lib/capybara/cuprite/cookie.rb', line 22 def path @attributes["path"] end |
#secure? ⇒ Boolean
30 31 32 |
# File 'lib/capybara/cuprite/cookie.rb', line 30 def secure? @attributes["secure"] end |
#session? ⇒ Boolean
38 39 40 |
# File 'lib/capybara/cuprite/cookie.rb', line 38 def session? @attributes["session"] end |
#size ⇒ Object
26 27 28 |
# File 'lib/capybara/cuprite/cookie.rb', line 26 def size @attributes["size"] end |
#value ⇒ Object
14 15 16 |
# File 'lib/capybara/cuprite/cookie.rb', line 14 def value @attributes["value"] end |