Class: Extractors::Safari
- Inherits:
-
Object
- Object
- Extractors::Safari
- Defined in:
- lib/bkmrq/extractors/safari.rb
Overview
Chrome Bookmarks Extractor
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extract ⇒ Object
8 9 10 |
# File 'lib/bkmrq/extractors/safari.rb', line 8 def self.extract new.extract end |
Instance Method Details
#bookmarks_path ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/bkmrq/extractors/safari.rb', line 16 def bookmarks_path unless /darwin|mac os/i.match?(RbConfig::CONFIG['host_os']) raise Bkmrq::Extractors::Error, 'bkmrq does not support Safari on your OS' end File.('~/Library/Safari/Bookmarks.plist') end |
#extract ⇒ Object
12 13 14 |
# File 'lib/bkmrq/extractors/safari.rb', line 12 def extract File.read(bookmarks_path) end |