Class: QuoraNotify::CookieReaders::FirefoxCookieReader
- Inherits:
-
CookieReader
- Object
- CookieReader
- QuoraNotify::CookieReaders::FirefoxCookieReader
- Defined in:
- lib/quora_notify/cookie_readers/firefox_cookie_reader.rb
Constant Summary collapse
- DEFAULT_COOKIE_PATH =
"#{ENV['HOME']}/Library/Application Support/Firefox/Profiles/*/cookies.sqlite"
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 20 |
# File 'lib/quora_notify/cookie_readers/firefox_cookie_reader.rb', line 9 def = Dir[][0] raise QuoraNotify::Exceptions::CookieReaderException, 'No cookie file found' unless && File.exists?() = [] db = SQLite3::Database.new() db.execute('SELECT name, value, baseDomain, path, isSecure, isHttpOnly, expiry, creationTime FROM moz_cookies') do |row| << (row) end end |