Class: QuoraNotify::CookieReaders::CookieReader
- Inherits:
-
Object
- Object
- QuoraNotify::CookieReaders::CookieReader
- Defined in:
- lib/quora_notify/cookie_readers/cookie_reader.rb
Overview
Subclasses should define a DEFAULT_COOKIE_PATH constant that will be used if no file path is provided to the constructor
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_COOKIE_PATH =
nil
Instance Method Summary collapse
-
#cookie_file_path ⇒ Object
Defaults to the standard safari cookie system path.
-
#initialize(file_path = nil) ⇒ CookieReader
constructor
Accepts: cookie_file_path: Use DEFAULT_COOKIE_PATH if nil (default).
-
#read_cookies ⇒ Object
Returns an array of Cookie objects Raises: binarycookieReaderException.
Constructor Details
#initialize(file_path = nil) ⇒ CookieReader
Accepts:
cookie_file_path: Use DEFAULT_COOKIE_PATH if nil (default)
8 9 10 |
# File 'lib/quora_notify/cookie_readers/cookie_reader.rb', line 8 def initialize(file_path = nil) @cookie_file_path = file_path end |
Instance Method Details
#cookie_file_path ⇒ Object
Defaults to the standard safari cookie system path
19 20 21 |
# File 'lib/quora_notify/cookie_readers/cookie_reader.rb', line 19 def @cookie_file_path || self.class::DEFAULT_COOKIE_PATH end |
#read_cookies ⇒ Object
Returns an array of Cookie objects Raises: binarycookieReaderException
14 15 16 |
# File 'lib/quora_notify/cookie_readers/cookie_reader.rb', line 14 def raise QuoraNotify::Exceptions::CookieReaderException, 'Not implemented' end |