Class: QuoraNotify::CookieReaders::ChromeCookieReader
- Inherits:
-
CookieReader
- Object
- CookieReader
- QuoraNotify::CookieReaders::ChromeCookieReader
- Defined in:
- lib/quora_notify/cookie_readers/chrome_cookie_reader.rb
Constant Summary collapse
- DEFAULT_COOKIE_PATH =
"#{ENV['HOME']}/Library/Application Support/Google/Chrome/Default/Cookies"
Instance Method Summary collapse
-
#read_cookies ⇒ Object
Returns an array of Cookie objects Raises: binarycookieReaderException.
Methods inherited from CookieReader
#cookie_file_path, #initialize
Constructor Details
This class inherits a constructor from QuoraNotify::CookieReaders::CookieReader
Instance Method Details
#read_cookies ⇒ Object
Returns an array of Cookie objects Raises: binarycookieReaderException
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/quora_notify/cookie_readers/chrome_cookie_reader.rb', line 9 def raise QuoraNotify::Exceptions::CookieReaderException, 'No cookie file found' unless File.exists?() = [] db = SQLite3::Database.new() db.execute('SELECT name, value, host_key, path, secure, httponly, expires_utc, creation_utc FROM cookies') do |row| << (row) end end |